mavlink/home/runner/work/rust-mavlink/rust-mavlink/target/debug/build/mavlink-82e5138eb12fa796/out/
ualberta.rs

1#![doc = "MAVLink ualberta dialect."]
2#![doc = ""]
3#![doc = "This file was automatically generated, do not edit."]
4#![allow(deprecated)]
5#[cfg(feature = "arbitrary")]
6use arbitrary::Arbitrary;
7#[allow(unused_imports)]
8use bitflags::bitflags;
9use mavlink_core::{bytes::Bytes, bytes_mut::BytesMut, MavlinkVersion, Message, MessageData};
10#[allow(unused_imports)]
11use num_derive::FromPrimitive;
12#[allow(unused_imports)]
13use num_derive::ToPrimitive;
14#[allow(unused_imports)]
15use num_traits::FromPrimitive;
16#[allow(unused_imports)]
17use num_traits::ToPrimitive;
18#[cfg(feature = "serde")]
19use serde::{Deserialize, Serialize};
20#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
21#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22#[cfg_attr(feature = "serde", serde(tag = "type"))]
23#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24#[repr(u32)]
25#[doc = "Actuator configuration, used to change a setting on an actuator. Component information metadata can be used to know which outputs support which commands."]
26pub enum ActuatorConfiguration {
27    #[doc = "Do nothing."]
28    ACTUATOR_CONFIGURATION_NONE = 0,
29    #[doc = "Command the actuator to beep now."]
30    ACTUATOR_CONFIGURATION_BEEP = 1,
31    #[doc = "Permanently set the actuator (ESC) to 3D mode (reversible thrust)."]
32    ACTUATOR_CONFIGURATION_3D_MODE_ON = 2,
33    #[doc = "Permanently set the actuator (ESC) to non 3D mode (non-reversible thrust)."]
34    ACTUATOR_CONFIGURATION_3D_MODE_OFF = 3,
35    #[doc = "Permanently set the actuator (ESC) to spin direction 1 (which can be clockwise or counter-clockwise)."]
36    ACTUATOR_CONFIGURATION_SPIN_DIRECTION1 = 4,
37    #[doc = "Permanently set the actuator (ESC) to spin direction 2 (opposite of direction 1)."]
38    ACTUATOR_CONFIGURATION_SPIN_DIRECTION2 = 5,
39}
40impl ActuatorConfiguration {
41    pub const DEFAULT: Self = Self::ACTUATOR_CONFIGURATION_NONE;
42}
43impl Default for ActuatorConfiguration {
44    fn default() -> Self {
45        Self::DEFAULT
46    }
47}
48#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
49#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
50#[cfg_attr(feature = "serde", serde(tag = "type"))]
51#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
52#[repr(u32)]
53#[doc = "Actuator output function. Values greater or equal to 1000 are autopilot-specific."]
54pub enum ActuatorOutputFunction {
55    #[doc = "No function (disabled)."]
56    ACTUATOR_OUTPUT_FUNCTION_NONE = 0,
57    #[doc = "Motor 1"]
58    ACTUATOR_OUTPUT_FUNCTION_MOTOR1 = 1,
59    #[doc = "Motor 2"]
60    ACTUATOR_OUTPUT_FUNCTION_MOTOR2 = 2,
61    #[doc = "Motor 3"]
62    ACTUATOR_OUTPUT_FUNCTION_MOTOR3 = 3,
63    #[doc = "Motor 4"]
64    ACTUATOR_OUTPUT_FUNCTION_MOTOR4 = 4,
65    #[doc = "Motor 5"]
66    ACTUATOR_OUTPUT_FUNCTION_MOTOR5 = 5,
67    #[doc = "Motor 6"]
68    ACTUATOR_OUTPUT_FUNCTION_MOTOR6 = 6,
69    #[doc = "Motor 7"]
70    ACTUATOR_OUTPUT_FUNCTION_MOTOR7 = 7,
71    #[doc = "Motor 8"]
72    ACTUATOR_OUTPUT_FUNCTION_MOTOR8 = 8,
73    #[doc = "Motor 9"]
74    ACTUATOR_OUTPUT_FUNCTION_MOTOR9 = 9,
75    #[doc = "Motor 10"]
76    ACTUATOR_OUTPUT_FUNCTION_MOTOR10 = 10,
77    #[doc = "Motor 11"]
78    ACTUATOR_OUTPUT_FUNCTION_MOTOR11 = 11,
79    #[doc = "Motor 12"]
80    ACTUATOR_OUTPUT_FUNCTION_MOTOR12 = 12,
81    #[doc = "Motor 13"]
82    ACTUATOR_OUTPUT_FUNCTION_MOTOR13 = 13,
83    #[doc = "Motor 14"]
84    ACTUATOR_OUTPUT_FUNCTION_MOTOR14 = 14,
85    #[doc = "Motor 15"]
86    ACTUATOR_OUTPUT_FUNCTION_MOTOR15 = 15,
87    #[doc = "Motor 16"]
88    ACTUATOR_OUTPUT_FUNCTION_MOTOR16 = 16,
89    #[doc = "Servo 1"]
90    ACTUATOR_OUTPUT_FUNCTION_SERVO1 = 33,
91    #[doc = "Servo 2"]
92    ACTUATOR_OUTPUT_FUNCTION_SERVO2 = 34,
93    #[doc = "Servo 3"]
94    ACTUATOR_OUTPUT_FUNCTION_SERVO3 = 35,
95    #[doc = "Servo 4"]
96    ACTUATOR_OUTPUT_FUNCTION_SERVO4 = 36,
97    #[doc = "Servo 5"]
98    ACTUATOR_OUTPUT_FUNCTION_SERVO5 = 37,
99    #[doc = "Servo 6"]
100    ACTUATOR_OUTPUT_FUNCTION_SERVO6 = 38,
101    #[doc = "Servo 7"]
102    ACTUATOR_OUTPUT_FUNCTION_SERVO7 = 39,
103    #[doc = "Servo 8"]
104    ACTUATOR_OUTPUT_FUNCTION_SERVO8 = 40,
105    #[doc = "Servo 9"]
106    ACTUATOR_OUTPUT_FUNCTION_SERVO9 = 41,
107    #[doc = "Servo 10"]
108    ACTUATOR_OUTPUT_FUNCTION_SERVO10 = 42,
109    #[doc = "Servo 11"]
110    ACTUATOR_OUTPUT_FUNCTION_SERVO11 = 43,
111    #[doc = "Servo 12"]
112    ACTUATOR_OUTPUT_FUNCTION_SERVO12 = 44,
113    #[doc = "Servo 13"]
114    ACTUATOR_OUTPUT_FUNCTION_SERVO13 = 45,
115    #[doc = "Servo 14"]
116    ACTUATOR_OUTPUT_FUNCTION_SERVO14 = 46,
117    #[doc = "Servo 15"]
118    ACTUATOR_OUTPUT_FUNCTION_SERVO15 = 47,
119    #[doc = "Servo 16"]
120    ACTUATOR_OUTPUT_FUNCTION_SERVO16 = 48,
121}
122impl ActuatorOutputFunction {
123    pub const DEFAULT: Self = Self::ACTUATOR_OUTPUT_FUNCTION_NONE;
124}
125impl Default for ActuatorOutputFunction {
126    fn default() -> Self {
127        Self::DEFAULT
128    }
129}
130#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
131#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
132#[cfg_attr(feature = "serde", serde(tag = "type"))]
133#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
134#[repr(u32)]
135#[doc = "Enumeration of the ADSB altimeter types"]
136pub enum AdsbAltitudeType {
137    #[doc = "Altitude reported from a Baro source using QNH reference"]
138    ADSB_ALTITUDE_TYPE_PRESSURE_QNH = 0,
139    #[doc = "Altitude reported from a GNSS source"]
140    ADSB_ALTITUDE_TYPE_GEOMETRIC = 1,
141}
142impl AdsbAltitudeType {
143    pub const DEFAULT: Self = Self::ADSB_ALTITUDE_TYPE_PRESSURE_QNH;
144}
145impl Default for AdsbAltitudeType {
146    fn default() -> Self {
147        Self::DEFAULT
148    }
149}
150#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
151#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
152#[cfg_attr(feature = "serde", serde(tag = "type"))]
153#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
154#[repr(u32)]
155#[doc = "ADSB classification for the type of vehicle emitting the transponder signal"]
156pub enum AdsbEmitterType {
157    ADSB_EMITTER_TYPE_NO_INFO = 0,
158    ADSB_EMITTER_TYPE_LIGHT = 1,
159    ADSB_EMITTER_TYPE_SMALL = 2,
160    ADSB_EMITTER_TYPE_LARGE = 3,
161    ADSB_EMITTER_TYPE_HIGH_VORTEX_LARGE = 4,
162    ADSB_EMITTER_TYPE_HEAVY = 5,
163    ADSB_EMITTER_TYPE_HIGHLY_MANUV = 6,
164    ADSB_EMITTER_TYPE_ROTOCRAFT = 7,
165    ADSB_EMITTER_TYPE_UNASSIGNED = 8,
166    ADSB_EMITTER_TYPE_GLIDER = 9,
167    ADSB_EMITTER_TYPE_LIGHTER_AIR = 10,
168    ADSB_EMITTER_TYPE_PARACHUTE = 11,
169    ADSB_EMITTER_TYPE_ULTRA_LIGHT = 12,
170    ADSB_EMITTER_TYPE_UNASSIGNED2 = 13,
171    ADSB_EMITTER_TYPE_UAV = 14,
172    ADSB_EMITTER_TYPE_SPACE = 15,
173    ADSB_EMITTER_TYPE_UNASSGINED3 = 16,
174    ADSB_EMITTER_TYPE_EMERGENCY_SURFACE = 17,
175    ADSB_EMITTER_TYPE_SERVICE_SURFACE = 18,
176    ADSB_EMITTER_TYPE_POINT_OBSTACLE = 19,
177}
178impl AdsbEmitterType {
179    pub const DEFAULT: Self = Self::ADSB_EMITTER_TYPE_NO_INFO;
180}
181impl Default for AdsbEmitterType {
182    fn default() -> Self {
183        Self::DEFAULT
184    }
185}
186bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags indicate status such as data validity of each data source. Set = data valid"] pub struct AdsbFlags : u16 { const ADSB_FLAGS_VALID_COORDS = 1 ; const ADSB_FLAGS_VALID_ALTITUDE = 2 ; const ADSB_FLAGS_VALID_HEADING = 4 ; const ADSB_FLAGS_VALID_VELOCITY = 8 ; const ADSB_FLAGS_VALID_CALLSIGN = 16 ; const ADSB_FLAGS_VALID_SQUAWK = 32 ; const ADSB_FLAGS_SIMULATED = 64 ; const ADSB_FLAGS_VERTICAL_VELOCITY_VALID = 128 ; const ADSB_FLAGS_BARO_VALID = 256 ; const ADSB_FLAGS_SOURCE_UAT = 32768 ; } }
187impl AdsbFlags {
188    pub const DEFAULT: Self = Self::ADSB_FLAGS_VALID_COORDS;
189}
190impl Default for AdsbFlags {
191    fn default() -> Self {
192        Self::DEFAULT
193    }
194}
195bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags are used in the AIS_VESSEL.fields bitmask to indicate validity of data in the other message fields. When set, the data is valid."] pub struct AisFlags : u16 { # [doc = "1 = Position accuracy less than 10m, 0 = position accuracy greater than 10m."] const AIS_FLAGS_POSITION_ACCURACY = 1 ; const AIS_FLAGS_VALID_COG = 2 ; const AIS_FLAGS_VALID_VELOCITY = 4 ; # [doc = "1 = Velocity over 52.5765m/s (102.2 knots)"] const AIS_FLAGS_HIGH_VELOCITY = 8 ; const AIS_FLAGS_VALID_TURN_RATE = 16 ; # [doc = "Only the sign of the returned turn rate value is valid, either greater than 5deg/30s or less than -5deg/30s"] const AIS_FLAGS_TURN_RATE_SIGN_ONLY = 32 ; const AIS_FLAGS_VALID_DIMENSIONS = 64 ; # [doc = "Distance to bow is larger than 511m"] const AIS_FLAGS_LARGE_BOW_DIMENSION = 128 ; # [doc = "Distance to stern is larger than 511m"] const AIS_FLAGS_LARGE_STERN_DIMENSION = 256 ; # [doc = "Distance to port side is larger than 63m"] const AIS_FLAGS_LARGE_PORT_DIMENSION = 512 ; # [doc = "Distance to starboard side is larger than 63m"] const AIS_FLAGS_LARGE_STARBOARD_DIMENSION = 1024 ; const AIS_FLAGS_VALID_CALLSIGN = 2048 ; const AIS_FLAGS_VALID_NAME = 4096 ; } }
196impl AisFlags {
197    pub const DEFAULT: Self = Self::AIS_FLAGS_POSITION_ACCURACY;
198}
199impl Default for AisFlags {
200    fn default() -> Self {
201        Self::DEFAULT
202    }
203}
204#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
205#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
206#[cfg_attr(feature = "serde", serde(tag = "type"))]
207#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
208#[repr(u32)]
209#[doc = "Navigational status of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
210pub enum AisNavStatus {
211    #[doc = "Under way using engine."]
212    UNDER_WAY = 0,
213    AIS_NAV_ANCHORED = 1,
214    AIS_NAV_UN_COMMANDED = 2,
215    AIS_NAV_RESTRICTED_MANOEUVERABILITY = 3,
216    AIS_NAV_DRAUGHT_CONSTRAINED = 4,
217    AIS_NAV_MOORED = 5,
218    AIS_NAV_AGROUND = 6,
219    AIS_NAV_FISHING = 7,
220    AIS_NAV_SAILING = 8,
221    AIS_NAV_RESERVED_HSC = 9,
222    AIS_NAV_RESERVED_WIG = 10,
223    AIS_NAV_RESERVED_1 = 11,
224    AIS_NAV_RESERVED_2 = 12,
225    AIS_NAV_RESERVED_3 = 13,
226    #[doc = "Search And Rescue Transponder."]
227    AIS_NAV_AIS_SART = 14,
228    #[doc = "Not available (default)."]
229    AIS_NAV_UNKNOWN = 15,
230}
231impl AisNavStatus {
232    pub const DEFAULT: Self = Self::UNDER_WAY;
233}
234impl Default for AisNavStatus {
235    fn default() -> Self {
236        Self::DEFAULT
237    }
238}
239#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
240#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
241#[cfg_attr(feature = "serde", serde(tag = "type"))]
242#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
243#[repr(u32)]
244#[doc = "Type of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
245pub enum AisType {
246    #[doc = "Not available (default)."]
247    AIS_TYPE_UNKNOWN = 0,
248    AIS_TYPE_RESERVED_1 = 1,
249    AIS_TYPE_RESERVED_2 = 2,
250    AIS_TYPE_RESERVED_3 = 3,
251    AIS_TYPE_RESERVED_4 = 4,
252    AIS_TYPE_RESERVED_5 = 5,
253    AIS_TYPE_RESERVED_6 = 6,
254    AIS_TYPE_RESERVED_7 = 7,
255    AIS_TYPE_RESERVED_8 = 8,
256    AIS_TYPE_RESERVED_9 = 9,
257    AIS_TYPE_RESERVED_10 = 10,
258    AIS_TYPE_RESERVED_11 = 11,
259    AIS_TYPE_RESERVED_12 = 12,
260    AIS_TYPE_RESERVED_13 = 13,
261    AIS_TYPE_RESERVED_14 = 14,
262    AIS_TYPE_RESERVED_15 = 15,
263    AIS_TYPE_RESERVED_16 = 16,
264    AIS_TYPE_RESERVED_17 = 17,
265    AIS_TYPE_RESERVED_18 = 18,
266    AIS_TYPE_RESERVED_19 = 19,
267    #[doc = "Wing In Ground effect."]
268    AIS_TYPE_WIG = 20,
269    AIS_TYPE_WIG_HAZARDOUS_A = 21,
270    AIS_TYPE_WIG_HAZARDOUS_B = 22,
271    AIS_TYPE_WIG_HAZARDOUS_C = 23,
272    AIS_TYPE_WIG_HAZARDOUS_D = 24,
273    AIS_TYPE_WIG_RESERVED_1 = 25,
274    AIS_TYPE_WIG_RESERVED_2 = 26,
275    AIS_TYPE_WIG_RESERVED_3 = 27,
276    AIS_TYPE_WIG_RESERVED_4 = 28,
277    AIS_TYPE_WIG_RESERVED_5 = 29,
278    AIS_TYPE_FISHING = 30,
279    AIS_TYPE_TOWING = 31,
280    #[doc = "Towing: length exceeds 200m or breadth exceeds 25m."]
281    AIS_TYPE_TOWING_LARGE = 32,
282    #[doc = "Dredging or other underwater ops."]
283    AIS_TYPE_DREDGING = 33,
284    AIS_TYPE_DIVING = 34,
285    AIS_TYPE_MILITARY = 35,
286    AIS_TYPE_SAILING = 36,
287    AIS_TYPE_PLEASURE = 37,
288    AIS_TYPE_RESERVED_20 = 38,
289    AIS_TYPE_RESERVED_21 = 39,
290    #[doc = "High Speed Craft."]
291    AIS_TYPE_HSC = 40,
292    AIS_TYPE_HSC_HAZARDOUS_A = 41,
293    AIS_TYPE_HSC_HAZARDOUS_B = 42,
294    AIS_TYPE_HSC_HAZARDOUS_C = 43,
295    AIS_TYPE_HSC_HAZARDOUS_D = 44,
296    AIS_TYPE_HSC_RESERVED_1 = 45,
297    AIS_TYPE_HSC_RESERVED_2 = 46,
298    AIS_TYPE_HSC_RESERVED_3 = 47,
299    AIS_TYPE_HSC_RESERVED_4 = 48,
300    AIS_TYPE_HSC_UNKNOWN = 49,
301    AIS_TYPE_PILOT = 50,
302    #[doc = "Search And Rescue vessel."]
303    AIS_TYPE_SAR = 51,
304    AIS_TYPE_TUG = 52,
305    AIS_TYPE_PORT_TENDER = 53,
306    #[doc = "Anti-pollution equipment."]
307    AIS_TYPE_ANTI_POLLUTION = 54,
308    AIS_TYPE_LAW_ENFORCEMENT = 55,
309    AIS_TYPE_SPARE_LOCAL_1 = 56,
310    AIS_TYPE_SPARE_LOCAL_2 = 57,
311    AIS_TYPE_MEDICAL_TRANSPORT = 58,
312    #[doc = "Noncombatant ship according to RR Resolution No. 18."]
313    AIS_TYPE_NONECOMBATANT = 59,
314    AIS_TYPE_PASSENGER = 60,
315    AIS_TYPE_PASSENGER_HAZARDOUS_A = 61,
316    AIS_TYPE_PASSENGER_HAZARDOUS_B = 62,
317    AIS_TYPE_PASSENGER_HAZARDOUS_C = 63,
318    AIS_TYPE_PASSENGER_HAZARDOUS_D = 64,
319    AIS_TYPE_PASSENGER_RESERVED_1 = 65,
320    AIS_TYPE_PASSENGER_RESERVED_2 = 66,
321    AIS_TYPE_PASSENGER_RESERVED_3 = 67,
322    AIS_TYPE_PASSENGER_RESERVED_4 = 68,
323    AIS_TYPE_PASSENGER_UNKNOWN = 69,
324    AIS_TYPE_CARGO = 70,
325    AIS_TYPE_CARGO_HAZARDOUS_A = 71,
326    AIS_TYPE_CARGO_HAZARDOUS_B = 72,
327    AIS_TYPE_CARGO_HAZARDOUS_C = 73,
328    AIS_TYPE_CARGO_HAZARDOUS_D = 74,
329    AIS_TYPE_CARGO_RESERVED_1 = 75,
330    AIS_TYPE_CARGO_RESERVED_2 = 76,
331    AIS_TYPE_CARGO_RESERVED_3 = 77,
332    AIS_TYPE_CARGO_RESERVED_4 = 78,
333    AIS_TYPE_CARGO_UNKNOWN = 79,
334    AIS_TYPE_TANKER = 80,
335    AIS_TYPE_TANKER_HAZARDOUS_A = 81,
336    AIS_TYPE_TANKER_HAZARDOUS_B = 82,
337    AIS_TYPE_TANKER_HAZARDOUS_C = 83,
338    AIS_TYPE_TANKER_HAZARDOUS_D = 84,
339    AIS_TYPE_TANKER_RESERVED_1 = 85,
340    AIS_TYPE_TANKER_RESERVED_2 = 86,
341    AIS_TYPE_TANKER_RESERVED_3 = 87,
342    AIS_TYPE_TANKER_RESERVED_4 = 88,
343    AIS_TYPE_TANKER_UNKNOWN = 89,
344    AIS_TYPE_OTHER = 90,
345    AIS_TYPE_OTHER_HAZARDOUS_A = 91,
346    AIS_TYPE_OTHER_HAZARDOUS_B = 92,
347    AIS_TYPE_OTHER_HAZARDOUS_C = 93,
348    AIS_TYPE_OTHER_HAZARDOUS_D = 94,
349    AIS_TYPE_OTHER_RESERVED_1 = 95,
350    AIS_TYPE_OTHER_RESERVED_2 = 96,
351    AIS_TYPE_OTHER_RESERVED_3 = 97,
352    AIS_TYPE_OTHER_RESERVED_4 = 98,
353    AIS_TYPE_OTHER_UNKNOWN = 99,
354}
355impl AisType {
356    pub const DEFAULT: Self = Self::AIS_TYPE_UNKNOWN;
357}
358impl Default for AisType {
359    fn default() -> Self {
360        Self::DEFAULT
361    }
362}
363bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates that none of the setpoint dimensions should be ignored."] pub struct AttitudeTargetTypemask : u8 { # [doc = "Ignore body roll rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE = 1 ; # [doc = "Ignore body pitch rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_PITCH_RATE_IGNORE = 2 ; # [doc = "Ignore body yaw rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_YAW_RATE_IGNORE = 4 ; # [doc = "Use 3D body thrust setpoint instead of throttle"] const ATTITUDE_TARGET_TYPEMASK_THRUST_BODY_SET = 32 ; # [doc = "Ignore throttle"] const ATTITUDE_TARGET_TYPEMASK_THROTTLE_IGNORE = 64 ; # [doc = "Ignore attitude"] const ATTITUDE_TARGET_TYPEMASK_ATTITUDE_IGNORE = 128 ; } }
364impl AttitudeTargetTypemask {
365    pub const DEFAULT: Self = Self::ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE;
366}
367impl Default for AttitudeTargetTypemask {
368    fn default() -> Self {
369        Self::DEFAULT
370    }
371}
372#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
373#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
374#[cfg_attr(feature = "serde", serde(tag = "type"))]
375#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
376#[repr(u32)]
377#[doc = "Axes that will be autotuned by MAV_CMD_DO_AUTOTUNE_ENABLE.         Note that at least one flag must be set in MAV_CMD_DO_AUTOTUNE_ENABLE.param2: if none are set, the flight stack will tune its default set of axes."]
378pub enum AutotuneAxis {
379    #[doc = "Autotune roll axis."]
380    AUTOTUNE_AXIS_ROLL = 1,
381    #[doc = "Autotune pitch axis."]
382    AUTOTUNE_AXIS_PITCH = 2,
383    #[doc = "Autotune yaw axis."]
384    AUTOTUNE_AXIS_YAW = 4,
385}
386impl AutotuneAxis {
387    pub const DEFAULT: Self = Self::AUTOTUNE_AXIS_ROLL;
388}
389impl Default for AutotuneAxis {
390    fn default() -> Self {
391        Self::DEFAULT
392    }
393}
394bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera capability flags (Bitmap)"] pub struct CameraCapFlags : u32 { # [doc = "Camera is able to record video"] const CAMERA_CAP_FLAGS_CAPTURE_VIDEO = 1 ; # [doc = "Camera is able to capture images"] const CAMERA_CAP_FLAGS_CAPTURE_IMAGE = 2 ; # [doc = "Camera has separate Video and Image/Photo modes (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_MODES = 4 ; # [doc = "Camera can capture images while in video mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_IMAGE_IN_VIDEO_MODE = 8 ; # [doc = "Camera can capture videos while in Photo/Image mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_VIDEO_IN_IMAGE_MODE = 16 ; # [doc = "Camera has image survey mode (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_IMAGE_SURVEY_MODE = 32 ; # [doc = "Camera has basic zoom control (MAV_CMD_SET_CAMERA_ZOOM)"] const CAMERA_CAP_FLAGS_HAS_BASIC_ZOOM = 64 ; # [doc = "Camera has basic focus control (MAV_CMD_SET_CAMERA_FOCUS)"] const CAMERA_CAP_FLAGS_HAS_BASIC_FOCUS = 128 ; # [doc = "Camera has video streaming capabilities (request VIDEO_STREAM_INFORMATION with MAV_CMD_REQUEST_MESSAGE for video streaming info)"] const CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM = 256 ; # [doc = "Camera supports tracking of a point on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_POINT = 512 ; # [doc = "Camera supports tracking of a selection rectangle on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE = 1024 ; # [doc = "Camera supports tracking geo status (CAMERA_TRACKING_GEO_STATUS)."] const CAMERA_CAP_FLAGS_HAS_TRACKING_GEO_STATUS = 2048 ; # [doc = "Camera supports absolute thermal range (request CAMERA_THERMAL_RANGE with MAV_CMD_REQUEST_MESSAGE)."] const CAMERA_CAP_FLAGS_HAS_THERMAL_RANGE = 4096 ; } }
395impl CameraCapFlags {
396    pub const DEFAULT: Self = Self::CAMERA_CAP_FLAGS_CAPTURE_VIDEO;
397}
398impl Default for CameraCapFlags {
399    fn default() -> Self {
400        Self::DEFAULT
401    }
402}
403#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
404#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
405#[cfg_attr(feature = "serde", serde(tag = "type"))]
406#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
407#[repr(u32)]
408#[doc = "Camera Modes."]
409pub enum CameraMode {
410    #[doc = "Camera is in image/photo capture mode."]
411    CAMERA_MODE_IMAGE = 0,
412    #[doc = "Camera is in video capture mode."]
413    CAMERA_MODE_VIDEO = 1,
414    #[doc = "Camera is in image survey capture mode. It allows for camera controller to do specific settings for surveys."]
415    CAMERA_MODE_IMAGE_SURVEY = 2,
416}
417impl CameraMode {
418    pub const DEFAULT: Self = Self::CAMERA_MODE_IMAGE;
419}
420impl Default for CameraMode {
421    fn default() -> Self {
422        Self::DEFAULT
423    }
424}
425#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
426#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
427#[cfg_attr(feature = "serde", serde(tag = "type"))]
428#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
429#[repr(u32)]
430#[doc = "Camera sources for MAV_CMD_SET_CAMERA_SOURCE"]
431pub enum CameraSource {
432    #[doc = "Default camera source."]
433    CAMERA_SOURCE_DEFAULT = 0,
434    #[doc = "RGB camera source."]
435    CAMERA_SOURCE_RGB = 1,
436    #[doc = "IR camera source."]
437    CAMERA_SOURCE_IR = 2,
438    #[doc = "NDVI camera source."]
439    CAMERA_SOURCE_NDVI = 3,
440}
441impl CameraSource {
442    pub const DEFAULT: Self = Self::CAMERA_SOURCE_DEFAULT;
443}
444impl Default for CameraSource {
445    fn default() -> Self {
446        Self::DEFAULT
447    }
448}
449#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
450#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
451#[cfg_attr(feature = "serde", serde(tag = "type"))]
452#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
453#[repr(u32)]
454#[doc = "Camera tracking modes"]
455pub enum CameraTrackingMode {
456    #[doc = "Not tracking"]
457    CAMERA_TRACKING_MODE_NONE = 0,
458    #[doc = "Target is a point"]
459    CAMERA_TRACKING_MODE_POINT = 1,
460    #[doc = "Target is a rectangle"]
461    CAMERA_TRACKING_MODE_RECTANGLE = 2,
462}
463impl CameraTrackingMode {
464    pub const DEFAULT: Self = Self::CAMERA_TRACKING_MODE_NONE;
465}
466impl Default for CameraTrackingMode {
467    fn default() -> Self {
468        Self::DEFAULT
469    }
470}
471#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
472#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
473#[cfg_attr(feature = "serde", serde(tag = "type"))]
474#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
475#[repr(u32)]
476#[doc = "Camera tracking status flags"]
477pub enum CameraTrackingStatusFlags {
478    #[doc = "Camera is not tracking"]
479    CAMERA_TRACKING_STATUS_FLAGS_IDLE = 0,
480    #[doc = "Camera is tracking"]
481    CAMERA_TRACKING_STATUS_FLAGS_ACTIVE = 1,
482    #[doc = "Camera tracking in error state"]
483    CAMERA_TRACKING_STATUS_FLAGS_ERROR = 2,
484}
485impl CameraTrackingStatusFlags {
486    pub const DEFAULT: Self = Self::CAMERA_TRACKING_STATUS_FLAGS_IDLE;
487}
488impl Default for CameraTrackingStatusFlags {
489    fn default() -> Self {
490        Self::DEFAULT
491    }
492}
493bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera tracking target data (shows where tracked target is within image)"] pub struct CameraTrackingTargetData : u8 { # [doc = "Target data embedded in image data (proprietary)"] const CAMERA_TRACKING_TARGET_DATA_EMBEDDED = 1 ; # [doc = "Target data rendered in image"] const CAMERA_TRACKING_TARGET_DATA_RENDERED = 2 ; # [doc = "Target data within status message (Point or Rectangle)"] const CAMERA_TRACKING_TARGET_DATA_IN_STATUS = 4 ; } }
494impl CameraTrackingTargetData {
495    pub const DEFAULT: Self = Self::CAMERA_TRACKING_TARGET_DATA_EMBEDDED;
496}
497impl Default for CameraTrackingTargetData {
498    fn default() -> Self {
499        Self::DEFAULT
500    }
501}
502#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
503#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
504#[cfg_attr(feature = "serde", serde(tag = "type"))]
505#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
506#[repr(u32)]
507#[doc = "Zoom types for MAV_CMD_SET_CAMERA_ZOOM"]
508pub enum CameraZoomType {
509    #[doc = "Zoom one step increment (-1 for wide, 1 for tele)"]
510    ZOOM_TYPE_STEP = 0,
511    #[doc = "Continuous normalized zoom in/out rate until stopped. Range -1..1, negative: wide, positive: narrow/tele, 0 to stop zooming. Other values should be clipped to the range."]
512    ZOOM_TYPE_CONTINUOUS = 1,
513    #[doc = "Zoom value as proportion of full camera range (a percentage value between 0.0 and 100.0)"]
514    ZOOM_TYPE_RANGE = 2,
515    #[doc = "Zoom value/variable focal length in millimetres. Note that there is no message to get the valid zoom range of the camera, so this can type can only be used for cameras where the zoom range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)"]
516    ZOOM_TYPE_FOCAL_LENGTH = 3,
517    #[doc = "Zoom value as horizontal field of view in degrees."]
518    ZOOM_TYPE_HORIZONTAL_FOV = 4,
519}
520impl CameraZoomType {
521    pub const DEFAULT: Self = Self::ZOOM_TYPE_STEP;
522}
523impl Default for CameraZoomType {
524    fn default() -> Self {
525        Self::DEFAULT
526    }
527}
528#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
529#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
530#[cfg_attr(feature = "serde", serde(tag = "type"))]
531#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
532#[repr(u32)]
533pub enum CanFilterOp {
534    CAN_FILTER_REPLACE = 0,
535    CAN_FILTER_ADD = 1,
536    CAN_FILTER_REMOVE = 2,
537}
538impl CanFilterOp {
539    pub const DEFAULT: Self = Self::CAN_FILTER_REPLACE;
540}
541impl Default for CanFilterOp {
542    fn default() -> Self {
543        Self::DEFAULT
544    }
545}
546#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
547#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
548#[cfg_attr(feature = "serde", serde(tag = "type"))]
549#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
550#[repr(u32)]
551#[doc = "Possible responses from a CELLULAR_CONFIG message."]
552pub enum CellularConfigResponse {
553    #[doc = "Changes accepted."]
554    CELLULAR_CONFIG_RESPONSE_ACCEPTED = 0,
555    #[doc = "Invalid APN."]
556    CELLULAR_CONFIG_RESPONSE_APN_ERROR = 1,
557    #[doc = "Invalid PIN."]
558    CELLULAR_CONFIG_RESPONSE_PIN_ERROR = 2,
559    #[doc = "Changes rejected."]
560    CELLULAR_CONFIG_RESPONSE_REJECTED = 3,
561    #[doc = "PUK is required to unblock SIM card."]
562    CELLULAR_CONFIG_BLOCKED_PUK_REQUIRED = 4,
563}
564impl CellularConfigResponse {
565    pub const DEFAULT: Self = Self::CELLULAR_CONFIG_RESPONSE_ACCEPTED;
566}
567impl Default for CellularConfigResponse {
568    fn default() -> Self {
569        Self::DEFAULT
570    }
571}
572#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
573#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
574#[cfg_attr(feature = "serde", serde(tag = "type"))]
575#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
576#[repr(u32)]
577#[doc = "These flags are used to diagnose the failure state of CELLULAR_STATUS"]
578pub enum CellularNetworkFailedReason {
579    #[doc = "No error"]
580    CELLULAR_NETWORK_FAILED_REASON_NONE = 0,
581    #[doc = "Error state is unknown"]
582    CELLULAR_NETWORK_FAILED_REASON_UNKNOWN = 1,
583    #[doc = "SIM is required for the modem but missing"]
584    CELLULAR_NETWORK_FAILED_REASON_SIM_MISSING = 2,
585    #[doc = "SIM is available, but not usable for connection"]
586    CELLULAR_NETWORK_FAILED_REASON_SIM_ERROR = 3,
587}
588impl CellularNetworkFailedReason {
589    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_FAILED_REASON_NONE;
590}
591impl Default for CellularNetworkFailedReason {
592    fn default() -> Self {
593        Self::DEFAULT
594    }
595}
596#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
597#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
598#[cfg_attr(feature = "serde", serde(tag = "type"))]
599#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
600#[repr(u32)]
601#[doc = "Cellular network radio type"]
602pub enum CellularNetworkRadioType {
603    CELLULAR_NETWORK_RADIO_TYPE_NONE = 0,
604    CELLULAR_NETWORK_RADIO_TYPE_GSM = 1,
605    CELLULAR_NETWORK_RADIO_TYPE_CDMA = 2,
606    CELLULAR_NETWORK_RADIO_TYPE_WCDMA = 3,
607    CELLULAR_NETWORK_RADIO_TYPE_LTE = 4,
608}
609impl CellularNetworkRadioType {
610    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_RADIO_TYPE_NONE;
611}
612impl Default for CellularNetworkRadioType {
613    fn default() -> Self {
614        Self::DEFAULT
615    }
616}
617#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
618#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
619#[cfg_attr(feature = "serde", serde(tag = "type"))]
620#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
621#[repr(u32)]
622#[doc = "These flags encode the cellular network status"]
623pub enum CellularStatusFlag {
624    #[doc = "State unknown or not reportable."]
625    CELLULAR_STATUS_FLAG_UNKNOWN = 0,
626    #[doc = "Modem is unusable"]
627    CELLULAR_STATUS_FLAG_FAILED = 1,
628    #[doc = "Modem is being initialized"]
629    CELLULAR_STATUS_FLAG_INITIALIZING = 2,
630    #[doc = "Modem is locked"]
631    CELLULAR_STATUS_FLAG_LOCKED = 3,
632    #[doc = "Modem is not enabled and is powered down"]
633    CELLULAR_STATUS_FLAG_DISABLED = 4,
634    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_DISABLED state"]
635    CELLULAR_STATUS_FLAG_DISABLING = 5,
636    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_ENABLED state"]
637    CELLULAR_STATUS_FLAG_ENABLING = 6,
638    #[doc = "Modem is enabled and powered on but not registered with a network provider and not available for data connections"]
639    CELLULAR_STATUS_FLAG_ENABLED = 7,
640    #[doc = "Modem is searching for a network provider to register"]
641    CELLULAR_STATUS_FLAG_SEARCHING = 8,
642    #[doc = "Modem is registered with a network provider, and data connections and messaging may be available for use"]
643    CELLULAR_STATUS_FLAG_REGISTERED = 9,
644    #[doc = "Modem is disconnecting and deactivating the last active packet data bearer. This state will not be entered if more than one packet data bearer is active and one of the active bearers is deactivated"]
645    CELLULAR_STATUS_FLAG_DISCONNECTING = 10,
646    #[doc = "Modem is activating and connecting the first packet data bearer. Subsequent bearer activations when another bearer is already active do not cause this state to be entered"]
647    CELLULAR_STATUS_FLAG_CONNECTING = 11,
648    #[doc = "One or more packet data bearers is active and connected"]
649    CELLULAR_STATUS_FLAG_CONNECTED = 12,
650}
651impl CellularStatusFlag {
652    pub const DEFAULT: Self = Self::CELLULAR_STATUS_FLAG_UNKNOWN;
653}
654impl Default for CellularStatusFlag {
655    fn default() -> Self {
656        Self::DEFAULT
657    }
658}
659#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
660#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
661#[cfg_attr(feature = "serde", serde(tag = "type"))]
662#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
663#[repr(u32)]
664#[doc = "Supported component metadata types. These are used in the \"general\" metadata file returned by COMPONENT_METADATA to provide information about supported metadata types. The types are not used directly in MAVLink messages."]
665pub enum CompMetadataType {
666    #[doc = "General information about the component. General metadata includes information about other metadata types supported by the component. Files of this type must be supported, and must be downloadable from vehicle using a MAVLink FTP URI."]
667    COMP_METADATA_TYPE_GENERAL = 0,
668    #[doc = "Parameter meta data."]
669    COMP_METADATA_TYPE_PARAMETER = 1,
670    #[doc = "Meta data that specifies which commands and command parameters the vehicle supports. (WIP)"]
671    COMP_METADATA_TYPE_COMMANDS = 2,
672    #[doc = "Meta data that specifies external non-MAVLink peripherals."]
673    COMP_METADATA_TYPE_PERIPHERALS = 3,
674    #[doc = "Meta data for the events interface."]
675    COMP_METADATA_TYPE_EVENTS = 4,
676    #[doc = "Meta data for actuator configuration (motors, servos and vehicle geometry) and testing."]
677    COMP_METADATA_TYPE_ACTUATORS = 5,
678}
679impl CompMetadataType {
680    pub const DEFAULT: Self = Self::COMP_METADATA_TYPE_GENERAL;
681}
682impl Default for CompMetadataType {
683    fn default() -> Self {
684        Self::DEFAULT
685    }
686}
687#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
688#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
689#[cfg_attr(feature = "serde", serde(tag = "type"))]
690#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
691#[repr(u32)]
692#[doc = "Indicates the ESC connection type."]
693pub enum EscConnectionType {
694    #[doc = "Traditional PPM ESC."]
695    ESC_CONNECTION_TYPE_PPM = 0,
696    #[doc = "Serial Bus connected ESC."]
697    ESC_CONNECTION_TYPE_SERIAL = 1,
698    #[doc = "One Shot PPM ESC."]
699    ESC_CONNECTION_TYPE_ONESHOT = 2,
700    #[doc = "I2C ESC."]
701    ESC_CONNECTION_TYPE_I2C = 3,
702    #[doc = "CAN-Bus ESC."]
703    ESC_CONNECTION_TYPE_CAN = 4,
704    #[doc = "DShot ESC."]
705    ESC_CONNECTION_TYPE_DSHOT = 5,
706}
707impl EscConnectionType {
708    pub const DEFAULT: Self = Self::ESC_CONNECTION_TYPE_PPM;
709}
710impl Default for EscConnectionType {
711    fn default() -> Self {
712        Self::DEFAULT
713    }
714}
715bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report ESC failures."] pub struct EscFailureFlags : u16 { # [doc = "Over current failure."] const ESC_FAILURE_OVER_CURRENT = 1 ; # [doc = "Over voltage failure."] const ESC_FAILURE_OVER_VOLTAGE = 2 ; # [doc = "Over temperature failure."] const ESC_FAILURE_OVER_TEMPERATURE = 4 ; # [doc = "Over RPM failure."] const ESC_FAILURE_OVER_RPM = 8 ; # [doc = "Inconsistent command failure i.e. out of bounds."] const ESC_FAILURE_INCONSISTENT_CMD = 16 ; # [doc = "Motor stuck failure."] const ESC_FAILURE_MOTOR_STUCK = 32 ; # [doc = "Generic ESC failure."] const ESC_FAILURE_GENERIC = 64 ; } }
716impl EscFailureFlags {
717    pub const DEFAULT: Self = Self::ESC_FAILURE_OVER_CURRENT;
718}
719impl Default for EscFailureFlags {
720    fn default() -> Self {
721        Self::DEFAULT
722    }
723}
724bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in ESTIMATOR_STATUS message"] pub struct EstimatorStatusFlags : u16 { # [doc = "True if the attitude estimate is good"] const ESTIMATOR_ATTITUDE = 1 ; # [doc = "True if the horizontal velocity estimate is good"] const ESTIMATOR_VELOCITY_HORIZ = 2 ; # [doc = "True if the  vertical velocity estimate is good"] const ESTIMATOR_VELOCITY_VERT = 4 ; # [doc = "True if the horizontal position (relative) estimate is good"] const ESTIMATOR_POS_HORIZ_REL = 8 ; # [doc = "True if the horizontal position (absolute) estimate is good"] const ESTIMATOR_POS_HORIZ_ABS = 16 ; # [doc = "True if the vertical position (absolute) estimate is good"] const ESTIMATOR_POS_VERT_ABS = 32 ; # [doc = "True if the vertical position (above ground) estimate is good"] const ESTIMATOR_POS_VERT_AGL = 64 ; # [doc = "True if the EKF is in a constant position mode and is not using external measurements (eg GPS or optical flow)"] const ESTIMATOR_CONST_POS_MODE = 128 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (relative) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_REL = 256 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (absolute) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_ABS = 512 ; # [doc = "True if the EKF has detected a GPS glitch"] const ESTIMATOR_GPS_GLITCH = 1024 ; # [doc = "True if the EKF has detected bad accelerometer data"] const ESTIMATOR_ACCEL_ERROR = 2048 ; } }
725impl EstimatorStatusFlags {
726    pub const DEFAULT: Self = Self::ESTIMATOR_ATTITUDE;
727}
728impl Default for EstimatorStatusFlags {
729    fn default() -> Self {
730        Self::DEFAULT
731    }
732}
733#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
734#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
735#[cfg_attr(feature = "serde", serde(tag = "type"))]
736#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
737#[repr(u32)]
738#[doc = "List of possible failure type to inject."]
739pub enum FailureType {
740    #[doc = "No failure injected, used to reset a previous failure."]
741    FAILURE_TYPE_OK = 0,
742    #[doc = "Sets unit off, so completely non-responsive."]
743    FAILURE_TYPE_OFF = 1,
744    #[doc = "Unit is stuck e.g. keeps reporting the same value."]
745    FAILURE_TYPE_STUCK = 2,
746    #[doc = "Unit is reporting complete garbage."]
747    FAILURE_TYPE_GARBAGE = 3,
748    #[doc = "Unit is consistently wrong."]
749    FAILURE_TYPE_WRONG = 4,
750    #[doc = "Unit is slow, so e.g. reporting at slower than expected rate."]
751    FAILURE_TYPE_SLOW = 5,
752    #[doc = "Data of unit is delayed in time."]
753    FAILURE_TYPE_DELAYED = 6,
754    #[doc = "Unit is sometimes working, sometimes not."]
755    FAILURE_TYPE_INTERMITTENT = 7,
756}
757impl FailureType {
758    pub const DEFAULT: Self = Self::FAILURE_TYPE_OK;
759}
760impl Default for FailureType {
761    fn default() -> Self {
762        Self::DEFAULT
763    }
764}
765#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
766#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
767#[cfg_attr(feature = "serde", serde(tag = "type"))]
768#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
769#[repr(u32)]
770#[doc = "List of possible units where failures can be injected."]
771pub enum FailureUnit {
772    FAILURE_UNIT_SENSOR_GYRO = 0,
773    FAILURE_UNIT_SENSOR_ACCEL = 1,
774    FAILURE_UNIT_SENSOR_MAG = 2,
775    FAILURE_UNIT_SENSOR_BARO = 3,
776    FAILURE_UNIT_SENSOR_GPS = 4,
777    FAILURE_UNIT_SENSOR_OPTICAL_FLOW = 5,
778    FAILURE_UNIT_SENSOR_VIO = 6,
779    FAILURE_UNIT_SENSOR_DISTANCE_SENSOR = 7,
780    FAILURE_UNIT_SENSOR_AIRSPEED = 8,
781    FAILURE_UNIT_SYSTEM_BATTERY = 100,
782    FAILURE_UNIT_SYSTEM_MOTOR = 101,
783    FAILURE_UNIT_SYSTEM_SERVO = 102,
784    FAILURE_UNIT_SYSTEM_AVOIDANCE = 103,
785    FAILURE_UNIT_SYSTEM_RC_SIGNAL = 104,
786    FAILURE_UNIT_SYSTEM_MAVLINK_SIGNAL = 105,
787}
788impl FailureUnit {
789    pub const DEFAULT: Self = Self::FAILURE_UNIT_SENSOR_GYRO;
790}
791impl Default for FailureUnit {
792    fn default() -> Self {
793        Self::DEFAULT
794    }
795}
796#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
797#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
798#[cfg_attr(feature = "serde", serde(tag = "type"))]
799#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
800#[repr(u32)]
801pub enum FenceBreach {
802    #[doc = "No last fence breach"]
803    FENCE_BREACH_NONE = 0,
804    #[doc = "Breached minimum altitude"]
805    FENCE_BREACH_MINALT = 1,
806    #[doc = "Breached maximum altitude"]
807    FENCE_BREACH_MAXALT = 2,
808    #[doc = "Breached fence boundary"]
809    FENCE_BREACH_BOUNDARY = 3,
810}
811impl FenceBreach {
812    pub const DEFAULT: Self = Self::FENCE_BREACH_NONE;
813}
814impl Default for FenceBreach {
815    fn default() -> Self {
816        Self::DEFAULT
817    }
818}
819#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
820#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
821#[cfg_attr(feature = "serde", serde(tag = "type"))]
822#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
823#[repr(u32)]
824#[doc = "Actions being taken to mitigate/prevent fence breach"]
825pub enum FenceMitigate {
826    #[doc = "Unknown"]
827    FENCE_MITIGATE_UNKNOWN = 0,
828    #[doc = "No actions being taken"]
829    FENCE_MITIGATE_NONE = 1,
830    #[doc = "Velocity limiting active to prevent breach"]
831    FENCE_MITIGATE_VEL_LIMIT = 2,
832}
833impl FenceMitigate {
834    pub const DEFAULT: Self = Self::FENCE_MITIGATE_UNKNOWN;
835}
836impl Default for FenceMitigate {
837    fn default() -> Self {
838        Self::DEFAULT
839    }
840}
841#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
842#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
843#[cfg_attr(feature = "serde", serde(tag = "type"))]
844#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
845#[repr(u32)]
846#[doc = "Fence types to enable or disable when using MAV_CMD_DO_FENCE_ENABLE.         Note that at least one of these flags must be set in MAV_CMD_DO_FENCE_ENABLE.param2.         If none are set, the flight stack will ignore the field and enable/disable its default set of fences (usually all of them)."]
847pub enum FenceType {
848    #[doc = "Maximum altitude fence"]
849    FENCE_TYPE_ALT_MAX = 1,
850    #[doc = "Circle fence"]
851    FENCE_TYPE_CIRCLE = 2,
852    #[doc = "Polygon fence"]
853    FENCE_TYPE_POLYGON = 4,
854    #[doc = "Minimum altitude fence"]
855    FENCE_TYPE_ALT_MIN = 8,
856}
857impl FenceType {
858    pub const DEFAULT: Self = Self::FENCE_TYPE_ALT_MAX;
859}
860impl Default for FenceType {
861    fn default() -> Self {
862        Self::DEFAULT
863    }
864}
865#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
866#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
867#[cfg_attr(feature = "serde", serde(tag = "type"))]
868#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
869#[repr(u32)]
870#[doc = "These values define the type of firmware release.  These values indicate the first version or release of this type.  For example the first alpha release would be 64, the second would be 65."]
871pub enum FirmwareVersionType {
872    #[doc = "development release"]
873    FIRMWARE_VERSION_TYPE_DEV = 0,
874    #[doc = "alpha release"]
875    FIRMWARE_VERSION_TYPE_ALPHA = 64,
876    #[doc = "beta release"]
877    FIRMWARE_VERSION_TYPE_BETA = 128,
878    #[doc = "release candidate"]
879    FIRMWARE_VERSION_TYPE_RC = 192,
880    #[doc = "official stable release"]
881    FIRMWARE_VERSION_TYPE_OFFICIAL = 255,
882}
883impl FirmwareVersionType {
884    pub const DEFAULT: Self = Self::FIRMWARE_VERSION_TYPE_DEV;
885}
886impl Default for FirmwareVersionType {
887    fn default() -> Self {
888        Self::DEFAULT
889    }
890}
891bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) capability flags (bitmap)."] pub struct GimbalDeviceCapFlags : u16 { # [doc = "Gimbal device supports a retracted position."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Gimbal device supports a horizontal, forward looking position, stabilized."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Gimbal device supports rotating around roll axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Gimbal device supports to follow a roll angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Gimbal device supports locking to a roll angle (generally that's the default with roll stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Gimbal device supports rotating around pitch axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Gimbal device supports to follow a pitch angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Gimbal device supports locking to a pitch angle (generally that's the default with pitch stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Gimbal device supports rotating around yaw axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Gimbal device supports to follow a yaw angle relative to the vehicle (generally that's the default)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Gimbal device supports locking to an absolute heading, i.e., yaw angle relative to North (earth frame, often this is an option available)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Gimbal device supports yawing/panning infinitely (e.g. using slip disk)."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Gimbal device supports yaw angles and angular velocities relative to North (earth frame). This usually requires support by an autopilot via AUTOPILOT_STATE_FOR_GIMBAL_DEVICE. Support can go on and off during runtime, which is reported by the flag GIMBAL_DEVICE_FLAGS_CAN_ACCEPT_YAW_IN_EARTH_FRAME."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Gimbal device supports radio control inputs as an alternative input for controlling the gimbal orientation."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; } }
892impl GimbalDeviceCapFlags {
893    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT;
894}
895impl Default for GimbalDeviceCapFlags {
896    fn default() -> Self {
897        Self::DEFAULT
898    }
899}
900bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) error flags (bitmap, 0 means no error)"] pub struct GimbalDeviceErrorFlags : u32 { # [doc = "Gimbal device is limited by hardware roll limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT = 1 ; # [doc = "Gimbal device is limited by hardware pitch limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_PITCH_LIMIT = 2 ; # [doc = "Gimbal device is limited by hardware yaw limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_YAW_LIMIT = 4 ; # [doc = "There is an error with the gimbal encoders."] const GIMBAL_DEVICE_ERROR_FLAGS_ENCODER_ERROR = 8 ; # [doc = "There is an error with the gimbal power source."] const GIMBAL_DEVICE_ERROR_FLAGS_POWER_ERROR = 16 ; # [doc = "There is an error with the gimbal motors."] const GIMBAL_DEVICE_ERROR_FLAGS_MOTOR_ERROR = 32 ; # [doc = "There is an error with the gimbal's software."] const GIMBAL_DEVICE_ERROR_FLAGS_SOFTWARE_ERROR = 64 ; # [doc = "There is an error with the gimbal's communication."] const GIMBAL_DEVICE_ERROR_FLAGS_COMMS_ERROR = 128 ; # [doc = "Gimbal device is currently calibrating."] const GIMBAL_DEVICE_ERROR_FLAGS_CALIBRATION_RUNNING = 256 ; # [doc = "Gimbal device is not assigned to a gimbal manager."] const GIMBAL_DEVICE_ERROR_FLAGS_NO_MANAGER = 512 ; } }
901impl GimbalDeviceErrorFlags {
902    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT;
903}
904impl Default for GimbalDeviceErrorFlags {
905    fn default() -> Self {
906        Self::DEFAULT
907    }
908}
909bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for gimbal device (lower level) operation."] pub struct GimbalDeviceFlags : u16 { # [doc = "Set to retracted safe position (no stabilization), takes precedence over all other flags."] const GIMBAL_DEVICE_FLAGS_RETRACT = 1 ; # [doc = "Set to neutral/default position, taking precedence over all other flags except RETRACT. Neutral is commonly forward-facing and horizontal (roll=pitch=yaw=0) but may be any orientation."] const GIMBAL_DEVICE_FLAGS_NEUTRAL = 2 ; # [doc = "Lock roll angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_ROLL_LOCK = 4 ; # [doc = "Lock pitch angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_PITCH_LOCK = 8 ; # [doc = "Lock yaw angle to absolute angle relative to North (not relative to vehicle). If this flag is set, the yaw angle and z component of angular velocity are relative to North (earth frame, x-axis pointing North), else they are relative to the vehicle heading (vehicle frame, earth frame rotated so that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_LOCK = 16 ; # [doc = "Yaw angle and z component of angular velocity are relative to the vehicle heading (vehicle frame, earth frame rotated such that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Yaw angle and z component of angular velocity are relative to North (earth frame, x-axis is pointing North)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Gimbal device can accept yaw angle inputs relative to North (earth frame). This flag is only for reporting (attempts to set this flag are ignored)."] const GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "The gimbal orientation is set exclusively by the RC signals feed to the gimbal's radio control inputs. MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE) are ignored."] const GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "The gimbal orientation is determined by combining/mixing the RC signals feed to the gimbal's radio control inputs and the MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE). How these two controls are combined or mixed is not defined by the protocol but is up to the implementation."] const GIMBAL_DEVICE_FLAGS_RC_MIXED = 512 ; } }
910impl GimbalDeviceFlags {
911    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_FLAGS_RETRACT;
912}
913impl Default for GimbalDeviceFlags {
914    fn default() -> Self {
915        Self::DEFAULT
916    }
917}
918bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal manager high level capability flags (bitmap). The first 16 bits are identical to the GIMBAL_DEVICE_CAP_FLAGS. However, the gimbal manager does not need to copy the flags from the gimbal but can also enhance the capabilities and thus add flags."] pub struct GimbalManagerCapFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; # [doc = "Gimbal manager supports to point to a local position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_LOCAL = 65536 ; # [doc = "Gimbal manager supports to point to a global latitude, longitude, altitude position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_GLOBAL = 131072 ; } }
919impl GimbalManagerCapFlags {
920    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT;
921}
922impl Default for GimbalManagerCapFlags {
923    fn default() -> Self {
924        Self::DEFAULT
925    }
926}
927bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for high level gimbal manager operation The first 16 bits are identical to the GIMBAL_DEVICE_FLAGS."] pub struct GimbalManagerFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_FLAGS_RETRACT."] const GIMBAL_MANAGER_FLAGS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_NEUTRAL."] const GIMBAL_MANAGER_FLAGS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ROLL_LOCK."] const GIMBAL_MANAGER_FLAGS_ROLL_LOCK = 4 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_PITCH_LOCK."] const GIMBAL_MANAGER_FLAGS_PITCH_LOCK = 8 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_LOCK."] const GIMBAL_MANAGER_FLAGS_YAW_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE."] const GIMBAL_MANAGER_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_MIXED."] const GIMBAL_MANAGER_FLAGS_RC_MIXED = 512 ; } }
928impl GimbalManagerFlags {
929    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_FLAGS_RETRACT;
930}
931impl Default for GimbalManagerFlags {
932    fn default() -> Self {
933        Self::DEFAULT
934    }
935}
936#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
937#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
938#[cfg_attr(feature = "serde", serde(tag = "type"))]
939#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
940#[repr(u32)]
941#[doc = "Type of GPS fix"]
942pub enum GpsFixType {
943    #[doc = "No GPS connected"]
944    GPS_FIX_TYPE_NO_GPS = 0,
945    #[doc = "No position information, GPS is connected"]
946    GPS_FIX_TYPE_NO_FIX = 1,
947    #[doc = "2D position"]
948    GPS_FIX_TYPE_2D_FIX = 2,
949    #[doc = "3D position"]
950    GPS_FIX_TYPE_3D_FIX = 3,
951    #[doc = "DGPS/SBAS aided 3D position"]
952    GPS_FIX_TYPE_DGPS = 4,
953    #[doc = "RTK float, 3D position"]
954    GPS_FIX_TYPE_RTK_FLOAT = 5,
955    #[doc = "RTK Fixed, 3D position"]
956    GPS_FIX_TYPE_RTK_FIXED = 6,
957    #[doc = "Static fixed, typically used for base stations"]
958    GPS_FIX_TYPE_STATIC = 7,
959    #[doc = "PPP, 3D position."]
960    GPS_FIX_TYPE_PPP = 8,
961}
962impl GpsFixType {
963    pub const DEFAULT: Self = Self::GPS_FIX_TYPE_NO_GPS;
964}
965impl Default for GpsFixType {
966    fn default() -> Self {
967        Self::DEFAULT
968    }
969}
970bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] pub struct GpsInputIgnoreFlags : u16 { # [doc = "ignore altitude field"] const GPS_INPUT_IGNORE_FLAG_ALT = 1 ; # [doc = "ignore hdop field"] const GPS_INPUT_IGNORE_FLAG_HDOP = 2 ; # [doc = "ignore vdop field"] const GPS_INPUT_IGNORE_FLAG_VDOP = 4 ; # [doc = "ignore horizontal velocity field (vn and ve)"] const GPS_INPUT_IGNORE_FLAG_VEL_HORIZ = 8 ; # [doc = "ignore vertical velocity field (vd)"] const GPS_INPUT_IGNORE_FLAG_VEL_VERT = 16 ; # [doc = "ignore speed accuracy field"] const GPS_INPUT_IGNORE_FLAG_SPEED_ACCURACY = 32 ; # [doc = "ignore horizontal accuracy field"] const GPS_INPUT_IGNORE_FLAG_HORIZONTAL_ACCURACY = 64 ; # [doc = "ignore vertical accuracy field"] const GPS_INPUT_IGNORE_FLAG_VERTICAL_ACCURACY = 128 ; } }
971impl GpsInputIgnoreFlags {
972    pub const DEFAULT: Self = Self::GPS_INPUT_IGNORE_FLAG_ALT;
973}
974impl Default for GpsInputIgnoreFlags {
975    fn default() -> Self {
976        Self::DEFAULT
977    }
978}
979#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
980#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
981#[cfg_attr(feature = "serde", serde(tag = "type"))]
982#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
983#[repr(u32)]
984#[doc = "Gripper actions."]
985pub enum GripperActions {
986    #[doc = "Gripper release cargo."]
987    GRIPPER_ACTION_RELEASE = 0,
988    #[doc = "Gripper grab onto cargo."]
989    GRIPPER_ACTION_GRAB = 1,
990}
991impl GripperActions {
992    pub const DEFAULT: Self = Self::GRIPPER_ACTION_RELEASE;
993}
994impl Default for GripperActions {
995    fn default() -> Self {
996        Self::DEFAULT
997    }
998}
999bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIGHRES_IMU message indicate which fields have updated since the last message"] pub struct HighresImuUpdatedFlags : u16 { # [doc = "The value in the xacc field has been updated"] const HIGHRES_IMU_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIGHRES_IMU_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated since"] const HIGHRES_IMU_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIGHRES_IMU_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIGHRES_IMU_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIGHRES_IMU_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIGHRES_IMU_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIGHRES_IMU_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIGHRES_IMU_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIGHRES_IMU_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIGHRES_IMU_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIGHRES_IMU_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIGHRES_IMU_UPDATED_TEMPERATURE = 4096 ; } }
1000impl HighresImuUpdatedFlags {
1001    pub const DEFAULT: Self = Self::HIGHRES_IMU_UPDATED_XACC;
1002}
1003impl Default for HighresImuUpdatedFlags {
1004    fn default() -> Self {
1005        Self::DEFAULT
1006    }
1007}
1008bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags used in HIL_ACTUATOR_CONTROLS message."] pub struct HilActuatorControlsFlags : u64 { # [doc = "Simulation is using lockstep"] const HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP = 1 ; } }
1009impl HilActuatorControlsFlags {
1010    pub const DEFAULT: Self = Self::HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP;
1011}
1012impl Default for HilActuatorControlsFlags {
1013    fn default() -> Self {
1014        Self::DEFAULT
1015    }
1016}
1017bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIL_SENSOR message indicate which fields have updated since the last message"] pub struct HilSensorUpdatedFlags : u32 { # [doc = "The value in the xacc field has been updated"] const HIL_SENSOR_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIL_SENSOR_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated"] const HIL_SENSOR_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIL_SENSOR_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIL_SENSOR_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIL_SENSOR_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIL_SENSOR_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIL_SENSOR_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIL_SENSOR_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIL_SENSOR_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIL_SENSOR_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIL_SENSOR_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIL_SENSOR_UPDATED_TEMPERATURE = 4096 ; # [doc = "Full reset of attitude/position/velocities/etc was performed in sim (Bit 31)."] const HIL_SENSOR_UPDATED_RESET = 2147483648 ; } }
1018impl HilSensorUpdatedFlags {
1019    pub const DEFAULT: Self = Self::HIL_SENSOR_UPDATED_XACC;
1020}
1021impl Default for HilSensorUpdatedFlags {
1022    fn default() -> Self {
1023        Self::DEFAULT
1024    }
1025}
1026bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report failure cases over the high latency telemetry."] pub struct HlFailureFlag : u16 { # [doc = "GPS failure."] const HL_FAILURE_FLAG_GPS = 1 ; # [doc = "Differential pressure sensor failure."] const HL_FAILURE_FLAG_DIFFERENTIAL_PRESSURE = 2 ; # [doc = "Absolute pressure sensor failure."] const HL_FAILURE_FLAG_ABSOLUTE_PRESSURE = 4 ; # [doc = "Accelerometer sensor failure."] const HL_FAILURE_FLAG_3D_ACCEL = 8 ; # [doc = "Gyroscope sensor failure."] const HL_FAILURE_FLAG_3D_GYRO = 16 ; # [doc = "Magnetometer sensor failure."] const HL_FAILURE_FLAG_3D_MAG = 32 ; # [doc = "Terrain subsystem failure."] const HL_FAILURE_FLAG_TERRAIN = 64 ; # [doc = "Battery failure/critical low battery."] const HL_FAILURE_FLAG_BATTERY = 128 ; # [doc = "RC receiver failure/no RC connection."] const HL_FAILURE_FLAG_RC_RECEIVER = 256 ; # [doc = "Offboard link failure."] const HL_FAILURE_FLAG_OFFBOARD_LINK = 512 ; # [doc = "Engine failure."] const HL_FAILURE_FLAG_ENGINE = 1024 ; # [doc = "Geofence violation."] const HL_FAILURE_FLAG_GEOFENCE = 2048 ; # [doc = "Estimator failure, for example measurement rejection or large variances."] const HL_FAILURE_FLAG_ESTIMATOR = 4096 ; # [doc = "Mission failure."] const HL_FAILURE_FLAG_MISSION = 8192 ; } }
1027impl HlFailureFlag {
1028    pub const DEFAULT: Self = Self::HL_FAILURE_FLAG_GPS;
1029}
1030impl Default for HlFailureFlag {
1031    fn default() -> Self {
1032        Self::DEFAULT
1033    }
1034}
1035bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Illuminator module error flags (bitmap, 0 means no error)"] pub struct IlluminatorErrorFlags : u32 { # [doc = "Illuminator thermal throttling error."] const ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING = 1 ; # [doc = "Illuminator over temperature shutdown error."] const ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN = 2 ; # [doc = "Illuminator thermistor failure."] const ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE = 4 ; } }
1036impl IlluminatorErrorFlags {
1037    pub const DEFAULT: Self = Self::ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING;
1038}
1039impl Default for IlluminatorErrorFlags {
1040    fn default() -> Self {
1041        Self::DEFAULT
1042    }
1043}
1044#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1045#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1046#[cfg_attr(feature = "serde", serde(tag = "type"))]
1047#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1048#[repr(u32)]
1049#[doc = "Modes of illuminator"]
1050pub enum IlluminatorMode {
1051    #[doc = "Illuminator mode is not specified/unknown"]
1052    ILLUMINATOR_MODE_UNKNOWN = 0,
1053    #[doc = "Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings"]
1054    ILLUMINATOR_MODE_INTERNAL_CONTROL = 1,
1055    #[doc = "Illuminator behavior is controlled by external factors: e.g. an external hardware signal"]
1056    ILLUMINATOR_MODE_EXTERNAL_SYNC = 2,
1057}
1058impl IlluminatorMode {
1059    pub const DEFAULT: Self = Self::ILLUMINATOR_MODE_UNKNOWN;
1060}
1061impl Default for IlluminatorMode {
1062    fn default() -> Self {
1063        Self::DEFAULT
1064    }
1065}
1066#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1067#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1068#[cfg_attr(feature = "serde", serde(tag = "type"))]
1069#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1070#[repr(u32)]
1071#[doc = "Type of landing target"]
1072pub enum LandingTargetType {
1073    #[doc = "Landing target signaled by light beacon (ex: IR-LOCK)"]
1074    LANDING_TARGET_TYPE_LIGHT_BEACON = 0,
1075    #[doc = "Landing target signaled by radio beacon (ex: ILS, NDB)"]
1076    LANDING_TARGET_TYPE_RADIO_BEACON = 1,
1077    #[doc = "Landing target represented by a fiducial marker (ex: ARTag)"]
1078    LANDING_TARGET_TYPE_VISION_FIDUCIAL = 2,
1079    #[doc = "Landing target represented by a pre-defined visual shape/feature (ex: X-marker, H-marker, square)"]
1080    LANDING_TARGET_TYPE_VISION_OTHER = 3,
1081}
1082impl LandingTargetType {
1083    pub const DEFAULT: Self = Self::LANDING_TARGET_TYPE_LIGHT_BEACON;
1084}
1085impl Default for LandingTargetType {
1086    fn default() -> Self {
1087        Self::DEFAULT
1088    }
1089}
1090#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1091#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1092#[cfg_attr(feature = "serde", serde(tag = "type"))]
1093#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1094#[repr(u32)]
1095pub enum MagCalStatus {
1096    MAG_CAL_NOT_STARTED = 0,
1097    MAG_CAL_WAITING_TO_START = 1,
1098    MAG_CAL_RUNNING_STEP_ONE = 2,
1099    MAG_CAL_RUNNING_STEP_TWO = 3,
1100    MAG_CAL_SUCCESS = 4,
1101    MAG_CAL_FAILED = 5,
1102    MAG_CAL_BAD_ORIENTATION = 6,
1103    MAG_CAL_BAD_RADIUS = 7,
1104}
1105impl MagCalStatus {
1106    pub const DEFAULT: Self = Self::MAG_CAL_NOT_STARTED;
1107}
1108impl Default for MagCalStatus {
1109    fn default() -> Self {
1110        Self::DEFAULT
1111    }
1112}
1113#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1114#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1115#[cfg_attr(feature = "serde", serde(tag = "type"))]
1116#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1117#[repr(u32)]
1118pub enum MavArmAuthDeniedReason {
1119    #[doc = "Not a specific reason"]
1120    MAV_ARM_AUTH_DENIED_REASON_GENERIC = 0,
1121    #[doc = "Authorizer will send the error as string to GCS"]
1122    MAV_ARM_AUTH_DENIED_REASON_NONE = 1,
1123    #[doc = "At least one waypoint have a invalid value"]
1124    MAV_ARM_AUTH_DENIED_REASON_INVALID_WAYPOINT = 2,
1125    #[doc = "Timeout in the authorizer process(in case it depends on network)"]
1126    MAV_ARM_AUTH_DENIED_REASON_TIMEOUT = 3,
1127    #[doc = "Airspace of the mission in use by another vehicle, second result parameter can have the waypoint id that caused it to be denied."]
1128    MAV_ARM_AUTH_DENIED_REASON_AIRSPACE_IN_USE = 4,
1129    #[doc = "Weather is not good to fly"]
1130    MAV_ARM_AUTH_DENIED_REASON_BAD_WEATHER = 5,
1131}
1132impl MavArmAuthDeniedReason {
1133    pub const DEFAULT: Self = Self::MAV_ARM_AUTH_DENIED_REASON_GENERIC;
1134}
1135impl Default for MavArmAuthDeniedReason {
1136    fn default() -> Self {
1137        Self::DEFAULT
1138    }
1139}
1140#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1141#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1142#[cfg_attr(feature = "serde", serde(tag = "type"))]
1143#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1144#[repr(u32)]
1145#[doc = "Micro air vehicle / autopilot classes. This identifies the individual model."]
1146pub enum MavAutopilot {
1147    #[doc = "Generic autopilot, full support for everything"]
1148    MAV_AUTOPILOT_GENERIC = 0,
1149    #[doc = "Reserved for future use."]
1150    MAV_AUTOPILOT_RESERVED = 1,
1151    #[doc = "SLUGS autopilot, <http://slugsuav.soe.ucsc.edu>"]
1152    MAV_AUTOPILOT_SLUGS = 2,
1153    #[doc = "ArduPilot - Plane/Copter/Rover/Sub/Tracker, <https://ardupilot.org>"]
1154    MAV_AUTOPILOT_ARDUPILOTMEGA = 3,
1155    #[doc = "OpenPilot, <http://openpilot.org>"]
1156    MAV_AUTOPILOT_OPENPILOT = 4,
1157    #[doc = "Generic autopilot only supporting simple waypoints"]
1158    MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY = 5,
1159    #[doc = "Generic autopilot supporting waypoints and other simple navigation commands"]
1160    MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY = 6,
1161    #[doc = "Generic autopilot supporting the full mission command set"]
1162    MAV_AUTOPILOT_GENERIC_MISSION_FULL = 7,
1163    #[doc = "No valid autopilot, e.g. a GCS or other MAVLink component"]
1164    MAV_AUTOPILOT_INVALID = 8,
1165    #[doc = "PPZ UAV - <http://nongnu.org/paparazzi>"]
1166    MAV_AUTOPILOT_PPZ = 9,
1167    #[doc = "UAV Dev Board"]
1168    MAV_AUTOPILOT_UDB = 10,
1169    #[doc = "FlexiPilot"]
1170    MAV_AUTOPILOT_FP = 11,
1171    #[doc = "PX4 Autopilot - <http://px4.io/>"]
1172    MAV_AUTOPILOT_PX4 = 12,
1173    #[doc = "SMACCMPilot - <http://smaccmpilot.org>"]
1174    MAV_AUTOPILOT_SMACCMPILOT = 13,
1175    #[doc = "AutoQuad -- <http://autoquad.org>"]
1176    MAV_AUTOPILOT_AUTOQUAD = 14,
1177    #[doc = "Armazila -- <http://armazila.com>"]
1178    MAV_AUTOPILOT_ARMAZILA = 15,
1179    #[doc = "Aerob -- <http://aerob.ru>"]
1180    MAV_AUTOPILOT_AEROB = 16,
1181    #[doc = "ASLUAV autopilot -- <http://www.asl.ethz.ch>"]
1182    MAV_AUTOPILOT_ASLUAV = 17,
1183    #[doc = "SmartAP Autopilot - <http://sky-drones.com>"]
1184    MAV_AUTOPILOT_SMARTAP = 18,
1185    #[doc = "AirRails - <http://uaventure.com>"]
1186    MAV_AUTOPILOT_AIRRAILS = 19,
1187    #[doc = "Fusion Reflex - <https://fusion.engineering>"]
1188    MAV_AUTOPILOT_REFLEX = 20,
1189}
1190impl MavAutopilot {
1191    pub const DEFAULT: Self = Self::MAV_AUTOPILOT_GENERIC;
1192}
1193impl Default for MavAutopilot {
1194    fn default() -> Self {
1195        Self::DEFAULT
1196    }
1197}
1198#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1199#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1200#[cfg_attr(feature = "serde", serde(tag = "type"))]
1201#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1202#[repr(u32)]
1203#[doc = "Enumeration for battery charge states."]
1204pub enum MavBatteryChargeState {
1205    #[doc = "Low battery state is not provided"]
1206    MAV_BATTERY_CHARGE_STATE_UNDEFINED = 0,
1207    #[doc = "Battery is not in low state. Normal operation."]
1208    MAV_BATTERY_CHARGE_STATE_OK = 1,
1209    #[doc = "Battery state is low, warn and monitor close."]
1210    MAV_BATTERY_CHARGE_STATE_LOW = 2,
1211    #[doc = "Battery state is critical, return or abort immediately."]
1212    MAV_BATTERY_CHARGE_STATE_CRITICAL = 3,
1213    #[doc = "Battery state is too low for ordinary abort sequence. Perform fastest possible emergency stop to prevent damage."]
1214    MAV_BATTERY_CHARGE_STATE_EMERGENCY = 4,
1215    #[doc = "Battery failed, damage unavoidable. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1216    MAV_BATTERY_CHARGE_STATE_FAILED = 5,
1217    #[doc = "Battery is diagnosed to be defective or an error occurred, usage is discouraged / prohibited. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1218    MAV_BATTERY_CHARGE_STATE_UNHEALTHY = 6,
1219    #[doc = "Battery is charging."]
1220    MAV_BATTERY_CHARGE_STATE_CHARGING = 7,
1221}
1222impl MavBatteryChargeState {
1223    pub const DEFAULT: Self = Self::MAV_BATTERY_CHARGE_STATE_UNDEFINED;
1224}
1225impl Default for MavBatteryChargeState {
1226    fn default() -> Self {
1227        Self::DEFAULT
1228    }
1229}
1230bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Smart battery supply status/fault flags (bitmask) for health indication. The battery must also report either MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY if any of these are set."] pub struct MavBatteryFault : u32 { # [doc = "Battery has deep discharged."] const MAV_BATTERY_FAULT_DEEP_DISCHARGE = 1 ; # [doc = "Voltage spikes."] const MAV_BATTERY_FAULT_SPIKES = 2 ; # [doc = "One or more cells have failed. Battery should also report MAV_BATTERY_CHARGE_STATE_FAILE (and should not be used)."] const MAV_BATTERY_FAULT_CELL_FAIL = 4 ; # [doc = "Over-current fault."] const MAV_BATTERY_FAULT_OVER_CURRENT = 8 ; # [doc = "Over-temperature fault."] const MAV_BATTERY_FAULT_OVER_TEMPERATURE = 16 ; # [doc = "Under-temperature fault."] const MAV_BATTERY_FAULT_UNDER_TEMPERATURE = 32 ; # [doc = "Vehicle voltage is not compatible with this battery (batteries on same power rail should have similar voltage)."] const MAV_BATTERY_FAULT_INCOMPATIBLE_VOLTAGE = 64 ; # [doc = "Battery firmware is not compatible with current autopilot firmware."] const MAV_BATTERY_FAULT_INCOMPATIBLE_FIRMWARE = 128 ; # [doc = "Battery is not compatible due to cell configuration (e.g. 5s1p when vehicle requires 6s)."] const BATTERY_FAULT_INCOMPATIBLE_CELLS_CONFIGURATION = 256 ; } }
1231impl MavBatteryFault {
1232    pub const DEFAULT: Self = Self::MAV_BATTERY_FAULT_DEEP_DISCHARGE;
1233}
1234impl Default for MavBatteryFault {
1235    fn default() -> Self {
1236        Self::DEFAULT
1237    }
1238}
1239#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1240#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1241#[cfg_attr(feature = "serde", serde(tag = "type"))]
1242#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1243#[repr(u32)]
1244#[doc = "Enumeration of battery functions"]
1245pub enum MavBatteryFunction {
1246    #[doc = "Battery function is unknown"]
1247    MAV_BATTERY_FUNCTION_UNKNOWN = 0,
1248    #[doc = "Battery supports all flight systems"]
1249    MAV_BATTERY_FUNCTION_ALL = 1,
1250    #[doc = "Battery for the propulsion system"]
1251    MAV_BATTERY_FUNCTION_PROPULSION = 2,
1252    #[doc = "Avionics battery"]
1253    MAV_BATTERY_FUNCTION_AVIONICS = 3,
1254    #[doc = "Payload battery"]
1255    MAV_BATTERY_FUNCTION_PAYLOAD = 4,
1256}
1257impl MavBatteryFunction {
1258    pub const DEFAULT: Self = Self::MAV_BATTERY_FUNCTION_UNKNOWN;
1259}
1260impl Default for MavBatteryFunction {
1261    fn default() -> Self {
1262        Self::DEFAULT
1263    }
1264}
1265#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1266#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1267#[cfg_attr(feature = "serde", serde(tag = "type"))]
1268#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1269#[repr(u32)]
1270#[doc = "Battery mode. Note, the normal operation mode (i.e. when flying) should be reported as MAV_BATTERY_MODE_UNKNOWN to allow message trimming in normal flight."]
1271pub enum MavBatteryMode {
1272    #[doc = "Battery mode not supported/unknown battery mode/normal operation."]
1273    MAV_BATTERY_MODE_UNKNOWN = 0,
1274    #[doc = "Battery is auto discharging (towards storage level)."]
1275    MAV_BATTERY_MODE_AUTO_DISCHARGING = 1,
1276    #[doc = "Battery in hot-swap mode (current limited to prevent spikes that might damage sensitive electrical circuits)."]
1277    MAV_BATTERY_MODE_HOT_SWAP = 2,
1278}
1279impl MavBatteryMode {
1280    pub const DEFAULT: Self = Self::MAV_BATTERY_MODE_UNKNOWN;
1281}
1282impl Default for MavBatteryMode {
1283    fn default() -> Self {
1284        Self::DEFAULT
1285    }
1286}
1287#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1288#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1289#[cfg_attr(feature = "serde", serde(tag = "type"))]
1290#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1291#[repr(u32)]
1292#[doc = "Enumeration of battery types"]
1293pub enum MavBatteryType {
1294    #[doc = "Not specified."]
1295    MAV_BATTERY_TYPE_UNKNOWN = 0,
1296    #[doc = "Lithium polymer battery"]
1297    MAV_BATTERY_TYPE_LIPO = 1,
1298    #[doc = "Lithium-iron-phosphate battery"]
1299    MAV_BATTERY_TYPE_LIFE = 2,
1300    #[doc = "Lithium-ION battery"]
1301    MAV_BATTERY_TYPE_LION = 3,
1302    #[doc = "Nickel metal hydride battery"]
1303    MAV_BATTERY_TYPE_NIMH = 4,
1304}
1305impl MavBatteryType {
1306    pub const DEFAULT: Self = Self::MAV_BATTERY_TYPE_UNKNOWN;
1307}
1308impl Default for MavBatteryType {
1309    fn default() -> Self {
1310        Self::DEFAULT
1311    }
1312}
1313#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1314#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1315#[cfg_attr(feature = "serde", serde(tag = "type"))]
1316#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1317#[repr(u32)]
1318#[doc = "Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. NaN and INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current yaw or latitude rather than a specific value). See <https://mavlink.io/en/guide/xml_schema.html#MAV_CMD> for information about the structure of the MAV_CMD entries"]
1319pub enum MavCmd {
1320    #[doc = "Navigate to waypoint. This is intended for use in missions (for guided commands outside of missions use MAV_CMD_DO_REPOSITION)."]
1321    MAV_CMD_NAV_WAYPOINT = 16,
1322    #[doc = "Loiter around this waypoint an unlimited amount of time"]
1323    MAV_CMD_NAV_LOITER_UNLIM = 17,
1324    #[doc = "Loiter around this waypoint for X turns"]
1325    MAV_CMD_NAV_LOITER_TURNS = 18,
1326    #[doc = "Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint."]
1327    MAV_CMD_NAV_LOITER_TIME = 19,
1328    #[doc = "Return to launch location"]
1329    MAV_CMD_NAV_RETURN_TO_LAUNCH = 20,
1330    #[doc = "Land at location."]
1331    MAV_CMD_NAV_LAND = 21,
1332    #[doc = "Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode."]
1333    MAV_CMD_NAV_TAKEOFF = 22,
1334    #[doc = "Land at local position (local frame only)"]
1335    MAV_CMD_NAV_LAND_LOCAL = 23,
1336    #[doc = "Takeoff from local position (local frame only)"]
1337    MAV_CMD_NAV_TAKEOFF_LOCAL = 24,
1338    #[doc = "Vehicle following, i.e. this waypoint represents the position of a moving vehicle"]
1339    MAV_CMD_NAV_FOLLOW = 25,
1340    #[doc = "Continue on the current course and climb/descend to specified altitude.  When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached."]
1341    MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT = 30,
1342    #[doc = "Begin loiter at the specified Latitude and Longitude.  If Lat=Lon=0, then loiter at the current position.  Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint."]
1343    MAV_CMD_NAV_LOITER_TO_ALT = 31,
1344    #[doc = "Begin following a target"]
1345    MAV_CMD_DO_FOLLOW = 32,
1346    #[doc = "Reposition the MAV after a follow target command has been sent"]
1347    MAV_CMD_DO_FOLLOW_REPOSITION = 33,
1348    #[doc = "Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults."]
1349    MAV_CMD_DO_ORBIT = 34,
1350    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1351    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1352    MAV_CMD_NAV_ROI = 80,
1353    #[doc = "Control autonomous path planning on the MAV."]
1354    MAV_CMD_NAV_PATHPLANNING = 81,
1355    #[doc = "Navigate to waypoint using a spline path."]
1356    MAV_CMD_NAV_SPLINE_WAYPOINT = 82,
1357    #[doc = "Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.)."]
1358    MAV_CMD_NAV_VTOL_TAKEOFF = 84,
1359    #[doc = "Land using VTOL mode"]
1360    MAV_CMD_NAV_VTOL_LAND = 85,
1361    #[doc = "hand control over to an external controller"]
1362    MAV_CMD_NAV_GUIDED_ENABLE = 92,
1363    #[doc = "Delay the next navigation command a number of seconds or until a specified time"]
1364    MAV_CMD_NAV_DELAY = 93,
1365    #[doc = "Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload."]
1366    MAV_CMD_NAV_PAYLOAD_PLACE = 94,
1367    #[doc = "NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration"]
1368    MAV_CMD_NAV_LAST = 95,
1369    #[doc = "Delay mission state machine."]
1370    MAV_CMD_CONDITION_DELAY = 112,
1371    #[doc = "Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached."]
1372    MAV_CMD_CONDITION_CHANGE_ALT = 113,
1373    #[doc = "Delay mission state machine until within desired distance of next NAV point."]
1374    MAV_CMD_CONDITION_DISTANCE = 114,
1375    #[doc = "Reach a certain target angle."]
1376    MAV_CMD_CONDITION_YAW = 115,
1377    #[doc = "NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration"]
1378    MAV_CMD_CONDITION_LAST = 159,
1379    #[doc = "Set system mode."]
1380    MAV_CMD_DO_SET_MODE = 176,
1381    #[doc = "Jump to the desired command in the mission list.  Repeat this action only the specified number of times"]
1382    MAV_CMD_DO_JUMP = 177,
1383    #[doc = "Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change"]
1384    MAV_CMD_DO_CHANGE_SPEED = 178,
1385    #[doc = "Sets the home position to either to the current position or a specified position.           The home position is the default position that the system will return to and land on.           The position is set automatically by the system during the takeoff (and may also be set using this command).           Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
1386    MAV_CMD_DO_SET_HOME = 179,
1387    #[deprecated = " See `PARAM_SET` (Deprecated since 2024-04)"]
1388    #[doc = "Set a system parameter.  Caution!  Use of this command requires knowledge of the numeric enumeration value of the parameter."]
1389    MAV_CMD_DO_SET_PARAMETER = 180,
1390    #[doc = "Set a relay to a condition."]
1391    MAV_CMD_DO_SET_RELAY = 181,
1392    #[doc = "Cycle a relay on and off for a desired number of cycles with a desired period."]
1393    MAV_CMD_DO_REPEAT_RELAY = 182,
1394    #[doc = "Set a servo to a desired PWM value."]
1395    MAV_CMD_DO_SET_SERVO = 183,
1396    #[doc = "Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period."]
1397    MAV_CMD_DO_REPEAT_SERVO = 184,
1398    #[doc = "0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED."]
1399    MAV_CMD_DO_FLIGHTTERMINATION = 185,
1400    #[doc = "Change altitude set point."]
1401    MAV_CMD_DO_CHANGE_ALTITUDE = 186,
1402    #[doc = "Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter)."]
1403    MAV_CMD_DO_SET_ACTUATOR = 187,
1404    #[doc = "Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item).           A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint).           The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path.           The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path.           If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing.           If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing.           The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed.           If specified, the item defines the waypoint at which the return segment starts.           If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored."]
1405    MAV_CMD_DO_RETURN_PATH_START = 188,
1406    #[doc = "Mission item to mark the start of a mission landing pattern, or a command to land with a mission landing pattern.          When used in a mission, this is a marker for the start of a sequence of mission items that represent a landing pattern.         It should be followed by a navigation item that defines the first waypoint of the landing sequence.         The start marker positional params are used only for selecting what landing pattern to use if several are defined in the mission (the selected pattern will be the one with the marker position that is closest to the vehicle when a landing is commanded).         If the marker item position has zero-values for latitude, longitude, and altitude, then landing pattern selection is instead based on the position of the first waypoint in the landing sequence.  \t      When sent as a command it triggers a landing using a mission landing pattern. \t      The location parameters are not used in this case, and should be set to 0."]
1407    MAV_CMD_DO_LAND_START = 189,
1408    #[doc = "Mission command to perform a landing from a rally point."]
1409    MAV_CMD_DO_RALLY_LAND = 190,
1410    #[doc = "Mission command to safely abort an autonomous landing."]
1411    MAV_CMD_DO_GO_AROUND = 191,
1412    #[doc = "Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead)."]
1413    MAV_CMD_DO_REPOSITION = 192,
1414    #[doc = "If in a GPS controlled position mode, hold the current position or continue."]
1415    MAV_CMD_DO_PAUSE_CONTINUE = 193,
1416    #[doc = "Set moving direction to forward or reverse."]
1417    MAV_CMD_DO_SET_REVERSE = 194,
1418    #[doc = "Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message."]
1419    MAV_CMD_DO_SET_ROI_LOCATION = 195,
1420    #[doc = "Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1421    MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET = 196,
1422    #[doc = "Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position."]
1423    MAV_CMD_DO_SET_ROI_NONE = 197,
1424    #[doc = "Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1425    MAV_CMD_DO_SET_ROI_SYSID = 198,
1426    #[doc = "Control onboard camera system."]
1427    MAV_CMD_DO_CONTROL_VIDEO = 200,
1428    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1429    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1430    MAV_CMD_DO_SET_ROI = 201,
1431    #[doc = "Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1432    MAV_CMD_DO_DIGICAM_CONFIGURE = 202,
1433    #[doc = "Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1434    MAV_CMD_DO_DIGICAM_CONTROL = 203,
1435    #[deprecated = "This message has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE` (Deprecated since 2020-01)"]
1436    #[doc = "Mission command to configure a camera or antenna mount"]
1437    MAV_CMD_DO_MOUNT_CONFIGURE = 204,
1438    #[deprecated = "This message is ambiguous and inconsistent. It has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW and `MAV_CMD_DO_SET_ROI_*` variants. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1439    #[doc = "Mission command to control a camera or antenna mount"]
1440    MAV_CMD_DO_MOUNT_CONTROL = 205,
1441    #[doc = "Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera."]
1442    MAV_CMD_DO_SET_CAM_TRIGG_DIST = 206,
1443    #[doc = "Enable the geofence.           This can be used in a mission or via the command protocol.           The persistence/lifetime of the setting is undefined.           Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission.           Flight stacks typically reset the setting to system defaults on reboot."]
1444    MAV_CMD_DO_FENCE_ENABLE = 207,
1445    #[doc = "Mission item/command to release a parachute or enable/disable auto release."]
1446    MAV_CMD_DO_PARACHUTE = 208,
1447    #[doc = "Command to perform motor test."]
1448    MAV_CMD_DO_MOTOR_TEST = 209,
1449    #[doc = "Change to/from inverted flight."]
1450    MAV_CMD_DO_INVERTED_FLIGHT = 210,
1451    #[doc = "Mission command to operate a gripper."]
1452    MAV_CMD_DO_GRIPPER = 211,
1453    #[doc = "Enable/disable autotune."]
1454    MAV_CMD_DO_AUTOTUNE_ENABLE = 212,
1455    #[doc = "Sets a desired vehicle turn angle and speed change."]
1456    MAV_CMD_NAV_SET_YAW_SPEED = 213,
1457    #[doc = "Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera."]
1458    MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL = 214,
1459    #[deprecated = " See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1460    #[doc = "Mission command to control a camera or antenna mount, using a quaternion as reference."]
1461    MAV_CMD_DO_MOUNT_CONTROL_QUAT = 220,
1462    #[doc = "set id of master controller"]
1463    MAV_CMD_DO_GUIDED_MASTER = 221,
1464    #[doc = "Set limits for external control"]
1465    MAV_CMD_DO_GUIDED_LIMITS = 222,
1466    #[doc = "Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines"]
1467    MAV_CMD_DO_ENGINE_CONTROL = 223,
1468    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).           If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. \t  Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2).            This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.           If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.           If the system is not in mission mode this command must not trigger a switch to mission mode.            The mission may be \"reset\" using param2.           Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`).           Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode.  \t  The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item)."]
1469    MAV_CMD_DO_SET_MISSION_CURRENT = 224,
1470    #[doc = "NOP - This command is only used to mark the upper limit of the DO commands in the enumeration"]
1471    MAV_CMD_DO_LAST = 240,
1472    #[doc = "Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero."]
1473    MAV_CMD_PREFLIGHT_CALIBRATION = 241,
1474    #[doc = "Set sensor offsets. This command will be only accepted if in pre-flight mode."]
1475    MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS = 242,
1476    #[doc = "Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named)."]
1477    MAV_CMD_PREFLIGHT_UAVCAN = 243,
1478    #[doc = "Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode."]
1479    MAV_CMD_PREFLIGHT_STORAGE = 245,
1480    #[doc = "Request the reboot or shutdown of system components."]
1481    MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN = 246,
1482    #[doc = "Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position."]
1483    MAV_CMD_OVERRIDE_GOTO = 252,
1484    #[doc = "Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera."]
1485    MAV_CMD_OBLIQUE_SURVEY = 260,
1486    #[doc = "Enable the specified standard MAVLink mode.           If the specified mode is not supported, the vehicle should ACK with MAV_RESULT_FAILED.           See <https://mavlink.io/en/services/standard_modes.html>"]
1487    MAV_CMD_DO_SET_STANDARD_MODE = 262,
1488    #[doc = "start running a mission"]
1489    MAV_CMD_MISSION_START = 300,
1490    #[doc = "Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots must NACK this command with MAV_RESULT_TEMPORARILY_REJECTED while armed."]
1491    MAV_CMD_ACTUATOR_TEST = 310,
1492    #[doc = "Actuator configuration command."]
1493    MAV_CMD_CONFIGURE_ACTUATOR = 311,
1494    #[doc = "Arms / Disarms a component"]
1495    MAV_CMD_COMPONENT_ARM_DISARM = 400,
1496    #[doc = "Instructs a target system to run pre-arm checks.           This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed.           This command should return MAV_RESULT_ACCEPTED if it will run the checks.           The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific).           The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed."]
1497    MAV_CMD_RUN_PREARM_CHECKS = 401,
1498    #[doc = "Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1499    MAV_CMD_ILLUMINATOR_ON_OFF = 405,
1500    #[doc = "Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1501    MAV_CMD_DO_ILLUMINATOR_CONFIGURE = 406,
1502    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1503    #[doc = "Request the home position from the vehicle. \t  The vehicle will ACK the command and then emit the HOME_POSITION message."]
1504    MAV_CMD_GET_HOME_POSITION = 410,
1505    #[doc = "Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting."]
1506    MAV_CMD_INJECT_FAILURE = 420,
1507    #[doc = "Starts receiver pairing."]
1508    MAV_CMD_START_RX_PAIR = 500,
1509    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1510    #[doc = "Request the interval between messages for a particular MAVLink message ID.           The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message."]
1511    MAV_CMD_GET_MESSAGE_INTERVAL = 510,
1512    #[doc = "Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM."]
1513    MAV_CMD_SET_MESSAGE_INTERVAL = 511,
1514    #[doc = "Request the target system(s) emit a single instance of a specified message (i.e. a \"one-shot\" version of MAV_CMD_SET_MESSAGE_INTERVAL)."]
1515    MAV_CMD_REQUEST_MESSAGE = 512,
1516    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1517    #[doc = "Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message"]
1518    MAV_CMD_REQUEST_PROTOCOL_VERSION = 519,
1519    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1520    #[doc = "Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message"]
1521    MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES = 520,
1522    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1523    #[doc = "Request camera information (CAMERA_INFORMATION)."]
1524    MAV_CMD_REQUEST_CAMERA_INFORMATION = 521,
1525    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1526    #[doc = "Request camera settings (CAMERA_SETTINGS)."]
1527    MAV_CMD_REQUEST_CAMERA_SETTINGS = 522,
1528    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1529    #[doc = "Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage."]
1530    MAV_CMD_REQUEST_STORAGE_INFORMATION = 525,
1531    #[doc = "Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage."]
1532    MAV_CMD_STORAGE_FORMAT = 526,
1533    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1534    #[doc = "Request camera capture status (CAMERA_CAPTURE_STATUS)"]
1535    MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS = 527,
1536    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1537    #[doc = "Request flight information (FLIGHT_INFORMATION)"]
1538    MAV_CMD_REQUEST_FLIGHT_INFORMATION = 528,
1539    #[doc = "Reset all camera settings to Factory Default"]
1540    MAV_CMD_RESET_CAMERA_SETTINGS = 529,
1541    #[doc = "Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming."]
1542    MAV_CMD_SET_CAMERA_MODE = 530,
1543    #[doc = "Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1544    MAV_CMD_SET_CAMERA_ZOOM = 531,
1545    #[doc = "Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1546    MAV_CMD_SET_CAMERA_FOCUS = 532,
1547    #[doc = "Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos).           There can only be one preferred save location for each particular media type: setting a media usage flag will clear/reset that same flag if set on any other storage.           If no flag is set the system should use its default storage.           A target system can choose to always use default storage, in which case it should ACK the command with MAV_RESULT_UNSUPPORTED.           A target system can choose to not allow a particular storage to be set as preferred storage, in which case it should ACK the command with MAV_RESULT_DENIED."]
1548    MAV_CMD_SET_STORAGE_USAGE = 533,
1549    #[doc = "Set camera source. Changes the camera's active sources on cameras with multiple image sensors."]
1550    MAV_CMD_SET_CAMERA_SOURCE = 534,
1551    #[doc = "Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG."]
1552    MAV_CMD_JUMP_TAG = 600,
1553    #[doc = "Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number."]
1554    MAV_CMD_DO_JUMP_TAG = 601,
1555    #[doc = "Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate."]
1556    MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW = 1000,
1557    #[doc = "Gimbal configuration to set which sysid/compid is in primary and secondary control."]
1558    MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE = 1001,
1559    #[doc = "Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1560    MAV_CMD_IMAGE_START_CAPTURE = 2000,
1561    #[doc = "Stop image capture sequence.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1562    MAV_CMD_IMAGE_STOP_CAPTURE = 2001,
1563    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1564    #[doc = "Re-request a CAMERA_IMAGE_CAPTURED message."]
1565    MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE = 2002,
1566    #[doc = "Enable or disable on-board camera triggering system."]
1567    MAV_CMD_DO_TRIGGER_CONTROL = 2003,
1568    #[doc = "If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking."]
1569    MAV_CMD_CAMERA_TRACK_POINT = 2004,
1570    #[doc = "If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking."]
1571    MAV_CMD_CAMERA_TRACK_RECTANGLE = 2005,
1572    #[doc = "Stops ongoing tracking."]
1573    MAV_CMD_CAMERA_STOP_TRACKING = 2010,
1574    #[doc = "Starts video capture (recording)."]
1575    MAV_CMD_VIDEO_START_CAPTURE = 2500,
1576    #[doc = "Stop the current video capture (recording)."]
1577    MAV_CMD_VIDEO_STOP_CAPTURE = 2501,
1578    #[doc = "Start video streaming"]
1579    MAV_CMD_VIDEO_START_STREAMING = 2502,
1580    #[doc = "Stop the given video stream"]
1581    MAV_CMD_VIDEO_STOP_STREAMING = 2503,
1582    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1583    #[doc = "Request video stream information (VIDEO_STREAM_INFORMATION)"]
1584    MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION = 2504,
1585    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1586    #[doc = "Request video stream status (VIDEO_STREAM_STATUS)"]
1587    MAV_CMD_REQUEST_VIDEO_STREAM_STATUS = 2505,
1588    #[doc = "Request to start streaming logging data over MAVLink (see also LOGGING_DATA message)"]
1589    MAV_CMD_LOGGING_START = 2510,
1590    #[doc = "Request to stop streaming log data over MAVLink"]
1591    MAV_CMD_LOGGING_STOP = 2511,
1592    MAV_CMD_AIRFRAME_CONFIGURATION = 2520,
1593    #[doc = "Request to start/stop transmitting over the high latency telemetry"]
1594    MAV_CMD_CONTROL_HIGH_LATENCY = 2600,
1595    #[doc = "Create a panorama at the current position"]
1596    MAV_CMD_PANORAMA_CREATE = 2800,
1597    #[doc = "Request VTOL transition"]
1598    MAV_CMD_DO_VTOL_TRANSITION = 3000,
1599    #[doc = "Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. \t\tIf approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds. \t\tIf the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON."]
1600    MAV_CMD_ARM_AUTHORIZATION_REQUEST = 3001,
1601    #[doc = "This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes."]
1602    MAV_CMD_SET_GUIDED_SUBMODE_STANDARD = 4000,
1603    #[doc = "This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position."]
1604    MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE = 4001,
1605    #[doc = "Delay mission state machine until gate has been reached."]
1606    MAV_CMD_CONDITION_GATE = 4501,
1607    #[doc = "Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead."]
1608    MAV_CMD_NAV_FENCE_RETURN_POINT = 5000,
1609    #[doc = "Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1610    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION = 5001,
1611    #[doc = "Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1612    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION = 5002,
1613    #[doc = "Circular fence area. The vehicle must stay inside this area."]
1614    MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION = 5003,
1615    #[doc = "Circular fence area. The vehicle must stay outside this area."]
1616    MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION = 5004,
1617    #[doc = "Rally point. You can have multiple rally points defined."]
1618    MAV_CMD_NAV_RALLY_POINT = 5100,
1619    #[doc = "Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages."]
1620    MAV_CMD_UAVCAN_GET_NODE_INFO = 5200,
1621    #[doc = "Change state of safety switch."]
1622    MAV_CMD_DO_SET_SAFETY_SWITCH_STATE = 5300,
1623    #[doc = "Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec."]
1624    MAV_CMD_DO_ADSB_OUT_IDENT = 10001,
1625    #[deprecated = "  (Deprecated since 2021-06)"]
1626    #[doc = "Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity."]
1627    MAV_CMD_PAYLOAD_PREPARE_DEPLOY = 30001,
1628    #[deprecated = "  (Deprecated since 2021-06)"]
1629    #[doc = "Control the payload deployment."]
1630    MAV_CMD_PAYLOAD_CONTROL_DEPLOY = 30002,
1631    #[doc = "Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location."]
1632    MAV_CMD_FIXED_MAG_CAL_YAW = 42006,
1633    #[doc = "Command to operate winch."]
1634    MAV_CMD_DO_WINCH = 42600,
1635    #[doc = "Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link."]
1636    MAV_CMD_EXTERNAL_POSITION_ESTIMATE = 43003,
1637    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1638    MAV_CMD_WAYPOINT_USER_1 = 31000,
1639    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1640    MAV_CMD_WAYPOINT_USER_2 = 31001,
1641    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1642    MAV_CMD_WAYPOINT_USER_3 = 31002,
1643    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1644    MAV_CMD_WAYPOINT_USER_4 = 31003,
1645    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1646    MAV_CMD_WAYPOINT_USER_5 = 31004,
1647    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1648    MAV_CMD_SPATIAL_USER_1 = 31005,
1649    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1650    MAV_CMD_SPATIAL_USER_2 = 31006,
1651    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1652    MAV_CMD_SPATIAL_USER_3 = 31007,
1653    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1654    MAV_CMD_SPATIAL_USER_4 = 31008,
1655    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1656    MAV_CMD_SPATIAL_USER_5 = 31009,
1657    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1658    MAV_CMD_USER_1 = 31010,
1659    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1660    MAV_CMD_USER_2 = 31011,
1661    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1662    MAV_CMD_USER_3 = 31012,
1663    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1664    MAV_CMD_USER_4 = 31013,
1665    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1666    MAV_CMD_USER_5 = 31014,
1667    #[doc = "Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages"]
1668    MAV_CMD_CAN_FORWARD = 32000,
1669}
1670impl MavCmd {
1671    pub const DEFAULT: Self = Self::MAV_CMD_NAV_WAYPOINT;
1672}
1673impl Default for MavCmd {
1674    fn default() -> Self {
1675        Self::DEFAULT
1676    }
1677}
1678#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1679#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1680#[cfg_attr(feature = "serde", serde(tag = "type"))]
1681#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1682#[repr(u32)]
1683#[doc = "Possible actions an aircraft can take to avoid a collision."]
1684pub enum MavCollisionAction {
1685    #[doc = "Ignore any potential collisions"]
1686    MAV_COLLISION_ACTION_NONE = 0,
1687    #[doc = "Report potential collision"]
1688    MAV_COLLISION_ACTION_REPORT = 1,
1689    #[doc = "Ascend or Descend to avoid threat"]
1690    MAV_COLLISION_ACTION_ASCEND_OR_DESCEND = 2,
1691    #[doc = "Move horizontally to avoid threat"]
1692    MAV_COLLISION_ACTION_MOVE_HORIZONTALLY = 3,
1693    #[doc = "Aircraft to move perpendicular to the collision's velocity vector"]
1694    MAV_COLLISION_ACTION_MOVE_PERPENDICULAR = 4,
1695    #[doc = "Aircraft to fly directly back to its launch point"]
1696    MAV_COLLISION_ACTION_RTL = 5,
1697    #[doc = "Aircraft to stop in place"]
1698    MAV_COLLISION_ACTION_HOVER = 6,
1699}
1700impl MavCollisionAction {
1701    pub const DEFAULT: Self = Self::MAV_COLLISION_ACTION_NONE;
1702}
1703impl Default for MavCollisionAction {
1704    fn default() -> Self {
1705        Self::DEFAULT
1706    }
1707}
1708#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1709#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1710#[cfg_attr(feature = "serde", serde(tag = "type"))]
1711#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1712#[repr(u32)]
1713#[doc = "Source of information about this collision."]
1714pub enum MavCollisionSrc {
1715    #[doc = "ID field references ADSB_VEHICLE packets"]
1716    MAV_COLLISION_SRC_ADSB = 0,
1717    #[doc = "ID field references MAVLink SRC ID"]
1718    MAV_COLLISION_SRC_MAVLINK_GPS_GLOBAL_INT = 1,
1719}
1720impl MavCollisionSrc {
1721    pub const DEFAULT: Self = Self::MAV_COLLISION_SRC_ADSB;
1722}
1723impl Default for MavCollisionSrc {
1724    fn default() -> Self {
1725        Self::DEFAULT
1726    }
1727}
1728#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1729#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1730#[cfg_attr(feature = "serde", serde(tag = "type"))]
1731#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1732#[repr(u32)]
1733#[doc = "Aircraft-rated danger from this threat."]
1734pub enum MavCollisionThreatLevel {
1735    #[doc = "Not a threat"]
1736    MAV_COLLISION_THREAT_LEVEL_NONE = 0,
1737    #[doc = "Craft is mildly concerned about this threat"]
1738    MAV_COLLISION_THREAT_LEVEL_LOW = 1,
1739    #[doc = "Craft is panicking, and may take actions to avoid threat"]
1740    MAV_COLLISION_THREAT_LEVEL_HIGH = 2,
1741}
1742impl MavCollisionThreatLevel {
1743    pub const DEFAULT: Self = Self::MAV_COLLISION_THREAT_LEVEL_NONE;
1744}
1745impl Default for MavCollisionThreatLevel {
1746    fn default() -> Self {
1747        Self::DEFAULT
1748    }
1749}
1750#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1751#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1752#[cfg_attr(feature = "serde", serde(tag = "type"))]
1753#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1754#[repr(u32)]
1755#[doc = "Component ids (values) for the different types and instances of onboard hardware/software that might make up a MAVLink system (autopilot, cameras, servos, GPS systems, avoidance systems etc.).       Components must use the appropriate ID in their source address when sending messages. Components can also use IDs to determine if they are the intended recipient of an incoming message. The MAV_COMP_ID_ALL value is used to indicate messages that must be processed by all components.       When creating new entries, components that can have multiple instances (e.g. cameras, servos etc.) should be allocated sequential values. An appropriate number of values should be left free after these components to allow the number of instances to be expanded."]
1756pub enum MavComponent {
1757    #[doc = "Target id (target_component) used to broadcast messages to all components of the receiving system. Components should attempt to process messages with this component ID and forward to components on any other interfaces. Note: This is not a valid *source* component id for a message."]
1758    MAV_COMP_ID_ALL = 0,
1759    #[doc = "System flight controller component (\"autopilot\"). Only one autopilot is expected in a particular system."]
1760    MAV_COMP_ID_AUTOPILOT1 = 1,
1761    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1762    MAV_COMP_ID_USER1 = 25,
1763    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1764    MAV_COMP_ID_USER2 = 26,
1765    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1766    MAV_COMP_ID_USER3 = 27,
1767    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1768    MAV_COMP_ID_USER4 = 28,
1769    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1770    MAV_COMP_ID_USER5 = 29,
1771    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1772    MAV_COMP_ID_USER6 = 30,
1773    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1774    MAV_COMP_ID_USER7 = 31,
1775    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1776    MAV_COMP_ID_USER8 = 32,
1777    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1778    MAV_COMP_ID_USER9 = 33,
1779    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1780    MAV_COMP_ID_USER10 = 34,
1781    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1782    MAV_COMP_ID_USER11 = 35,
1783    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1784    MAV_COMP_ID_USER12 = 36,
1785    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1786    MAV_COMP_ID_USER13 = 37,
1787    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1788    MAV_COMP_ID_USER14 = 38,
1789    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1790    MAV_COMP_ID_USER15 = 39,
1791    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1792    MAV_COMP_ID_USER16 = 40,
1793    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1794    MAV_COMP_ID_USER17 = 41,
1795    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1796    MAV_COMP_ID_USER18 = 42,
1797    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1798    MAV_COMP_ID_USER19 = 43,
1799    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1800    MAV_COMP_ID_USER20 = 44,
1801    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1802    MAV_COMP_ID_USER21 = 45,
1803    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1804    MAV_COMP_ID_USER22 = 46,
1805    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1806    MAV_COMP_ID_USER23 = 47,
1807    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1808    MAV_COMP_ID_USER24 = 48,
1809    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1810    MAV_COMP_ID_USER25 = 49,
1811    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1812    MAV_COMP_ID_USER26 = 50,
1813    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1814    MAV_COMP_ID_USER27 = 51,
1815    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1816    MAV_COMP_ID_USER28 = 52,
1817    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1818    MAV_COMP_ID_USER29 = 53,
1819    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1820    MAV_COMP_ID_USER30 = 54,
1821    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1822    MAV_COMP_ID_USER31 = 55,
1823    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1824    MAV_COMP_ID_USER32 = 56,
1825    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1826    MAV_COMP_ID_USER33 = 57,
1827    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1828    MAV_COMP_ID_USER34 = 58,
1829    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1830    MAV_COMP_ID_USER35 = 59,
1831    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1832    MAV_COMP_ID_USER36 = 60,
1833    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1834    MAV_COMP_ID_USER37 = 61,
1835    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1836    MAV_COMP_ID_USER38 = 62,
1837    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1838    MAV_COMP_ID_USER39 = 63,
1839    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1840    MAV_COMP_ID_USER40 = 64,
1841    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1842    MAV_COMP_ID_USER41 = 65,
1843    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1844    MAV_COMP_ID_USER42 = 66,
1845    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1846    MAV_COMP_ID_USER43 = 67,
1847    #[doc = "Telemetry radio (e.g. SiK radio, or other component that emits RADIO_STATUS messages)."]
1848    MAV_COMP_ID_TELEMETRY_RADIO = 68,
1849    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1850    MAV_COMP_ID_USER45 = 69,
1851    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1852    MAV_COMP_ID_USER46 = 70,
1853    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1854    MAV_COMP_ID_USER47 = 71,
1855    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1856    MAV_COMP_ID_USER48 = 72,
1857    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1858    MAV_COMP_ID_USER49 = 73,
1859    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1860    MAV_COMP_ID_USER50 = 74,
1861    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1862    MAV_COMP_ID_USER51 = 75,
1863    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1864    MAV_COMP_ID_USER52 = 76,
1865    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1866    MAV_COMP_ID_USER53 = 77,
1867    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1868    MAV_COMP_ID_USER54 = 78,
1869    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1870    MAV_COMP_ID_USER55 = 79,
1871    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1872    MAV_COMP_ID_USER56 = 80,
1873    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1874    MAV_COMP_ID_USER57 = 81,
1875    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1876    MAV_COMP_ID_USER58 = 82,
1877    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1878    MAV_COMP_ID_USER59 = 83,
1879    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1880    MAV_COMP_ID_USER60 = 84,
1881    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1882    MAV_COMP_ID_USER61 = 85,
1883    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1884    MAV_COMP_ID_USER62 = 86,
1885    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1886    MAV_COMP_ID_USER63 = 87,
1887    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1888    MAV_COMP_ID_USER64 = 88,
1889    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1890    MAV_COMP_ID_USER65 = 89,
1891    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1892    MAV_COMP_ID_USER66 = 90,
1893    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1894    MAV_COMP_ID_USER67 = 91,
1895    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1896    MAV_COMP_ID_USER68 = 92,
1897    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1898    MAV_COMP_ID_USER69 = 93,
1899    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1900    MAV_COMP_ID_USER70 = 94,
1901    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1902    MAV_COMP_ID_USER71 = 95,
1903    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1904    MAV_COMP_ID_USER72 = 96,
1905    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1906    MAV_COMP_ID_USER73 = 97,
1907    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1908    MAV_COMP_ID_USER74 = 98,
1909    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1910    MAV_COMP_ID_USER75 = 99,
1911    #[doc = "Camera #1."]
1912    MAV_COMP_ID_CAMERA = 100,
1913    #[doc = "Camera #2."]
1914    MAV_COMP_ID_CAMERA2 = 101,
1915    #[doc = "Camera #3."]
1916    MAV_COMP_ID_CAMERA3 = 102,
1917    #[doc = "Camera #4."]
1918    MAV_COMP_ID_CAMERA4 = 103,
1919    #[doc = "Camera #5."]
1920    MAV_COMP_ID_CAMERA5 = 104,
1921    #[doc = "Camera #6."]
1922    MAV_COMP_ID_CAMERA6 = 105,
1923    #[doc = "Servo #1."]
1924    MAV_COMP_ID_SERVO1 = 140,
1925    #[doc = "Servo #2."]
1926    MAV_COMP_ID_SERVO2 = 141,
1927    #[doc = "Servo #3."]
1928    MAV_COMP_ID_SERVO3 = 142,
1929    #[doc = "Servo #4."]
1930    MAV_COMP_ID_SERVO4 = 143,
1931    #[doc = "Servo #5."]
1932    MAV_COMP_ID_SERVO5 = 144,
1933    #[doc = "Servo #6."]
1934    MAV_COMP_ID_SERVO6 = 145,
1935    #[doc = "Servo #7."]
1936    MAV_COMP_ID_SERVO7 = 146,
1937    #[doc = "Servo #8."]
1938    MAV_COMP_ID_SERVO8 = 147,
1939    #[doc = "Servo #9."]
1940    MAV_COMP_ID_SERVO9 = 148,
1941    #[doc = "Servo #10."]
1942    MAV_COMP_ID_SERVO10 = 149,
1943    #[doc = "Servo #11."]
1944    MAV_COMP_ID_SERVO11 = 150,
1945    #[doc = "Servo #12."]
1946    MAV_COMP_ID_SERVO12 = 151,
1947    #[doc = "Servo #13."]
1948    MAV_COMP_ID_SERVO13 = 152,
1949    #[doc = "Servo #14."]
1950    MAV_COMP_ID_SERVO14 = 153,
1951    #[doc = "Gimbal #1."]
1952    MAV_COMP_ID_GIMBAL = 154,
1953    #[doc = "Logging component."]
1954    MAV_COMP_ID_LOG = 155,
1955    #[doc = "Automatic Dependent Surveillance-Broadcast (ADS-B) component."]
1956    MAV_COMP_ID_ADSB = 156,
1957    #[doc = "On Screen Display (OSD) devices for video links."]
1958    MAV_COMP_ID_OSD = 157,
1959    #[doc = "Generic autopilot peripheral component ID. Meant for devices that do not implement the parameter microservice."]
1960    MAV_COMP_ID_PERIPHERAL = 158,
1961    #[deprecated = "All gimbals should use MAV_COMP_ID_GIMBAL. See `MAV_COMP_ID_GIMBAL` (Deprecated since 2018-11)"]
1962    #[doc = "Gimbal ID for QX1."]
1963    MAV_COMP_ID_QX1_GIMBAL = 159,
1964    #[doc = "FLARM collision alert component."]
1965    MAV_COMP_ID_FLARM = 160,
1966    #[doc = "Parachute component."]
1967    MAV_COMP_ID_PARACHUTE = 161,
1968    #[doc = "Winch component."]
1969    MAV_COMP_ID_WINCH = 169,
1970    #[doc = "Gimbal #2."]
1971    MAV_COMP_ID_GIMBAL2 = 171,
1972    #[doc = "Gimbal #3."]
1973    MAV_COMP_ID_GIMBAL3 = 172,
1974    #[doc = "Gimbal #4"]
1975    MAV_COMP_ID_GIMBAL4 = 173,
1976    #[doc = "Gimbal #5."]
1977    MAV_COMP_ID_GIMBAL5 = 174,
1978    #[doc = "Gimbal #6."]
1979    MAV_COMP_ID_GIMBAL6 = 175,
1980    #[doc = "Battery #1."]
1981    MAV_COMP_ID_BATTERY = 180,
1982    #[doc = "Battery #2."]
1983    MAV_COMP_ID_BATTERY2 = 181,
1984    #[doc = "CAN over MAVLink client."]
1985    MAV_COMP_ID_MAVCAN = 189,
1986    #[doc = "Component that can generate/supply a mission flight plan (e.g. GCS or developer API)."]
1987    MAV_COMP_ID_MISSIONPLANNER = 190,
1988    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
1989    MAV_COMP_ID_ONBOARD_COMPUTER = 191,
1990    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
1991    MAV_COMP_ID_ONBOARD_COMPUTER2 = 192,
1992    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
1993    MAV_COMP_ID_ONBOARD_COMPUTER3 = 193,
1994    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
1995    MAV_COMP_ID_ONBOARD_COMPUTER4 = 194,
1996    #[doc = "Component that finds an optimal path between points based on a certain constraint (e.g. minimum snap, shortest path, cost, etc.)."]
1997    MAV_COMP_ID_PATHPLANNER = 195,
1998    #[doc = "Component that plans a collision free path between two points."]
1999    MAV_COMP_ID_OBSTACLE_AVOIDANCE = 196,
2000    #[doc = "Component that provides position estimates using VIO techniques."]
2001    MAV_COMP_ID_VISUAL_INERTIAL_ODOMETRY = 197,
2002    #[doc = "Component that manages pairing of vehicle and GCS."]
2003    MAV_COMP_ID_PAIRING_MANAGER = 198,
2004    #[doc = "Inertial Measurement Unit (IMU) #1."]
2005    MAV_COMP_ID_IMU = 200,
2006    #[doc = "Inertial Measurement Unit (IMU) #2."]
2007    MAV_COMP_ID_IMU_2 = 201,
2008    #[doc = "Inertial Measurement Unit (IMU) #3."]
2009    MAV_COMP_ID_IMU_3 = 202,
2010    #[doc = "GPS #1."]
2011    MAV_COMP_ID_GPS = 220,
2012    #[doc = "GPS #2."]
2013    MAV_COMP_ID_GPS2 = 221,
2014    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2015    MAV_COMP_ID_ODID_TXRX_1 = 236,
2016    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2017    MAV_COMP_ID_ODID_TXRX_2 = 237,
2018    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2019    MAV_COMP_ID_ODID_TXRX_3 = 238,
2020    #[doc = "Component to bridge MAVLink to UDP (i.e. from a UART)."]
2021    MAV_COMP_ID_UDP_BRIDGE = 240,
2022    #[doc = "Component to bridge to UART (i.e. from UDP)."]
2023    MAV_COMP_ID_UART_BRIDGE = 241,
2024    #[doc = "Component handling TUNNEL messages (e.g. vendor specific GUI of a component)."]
2025    MAV_COMP_ID_TUNNEL_NODE = 242,
2026    #[doc = "Illuminator"]
2027    MAV_COMP_ID_ILLUMINATOR = 243,
2028    #[deprecated = "System control does not require a separate component ID. Instead, system commands should be sent with target_component=MAV_COMP_ID_ALL allowing the target component to use any appropriate component id. See `MAV_COMP_ID_ALL` (Deprecated since 2018-11)"]
2029    #[doc = "Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.)."]
2030    MAV_COMP_ID_SYSTEM_CONTROL = 250,
2031}
2032impl MavComponent {
2033    pub const DEFAULT: Self = Self::MAV_COMP_ID_ALL;
2034}
2035impl Default for MavComponent {
2036    fn default() -> Self {
2037        Self::DEFAULT
2038    }
2039}
2040#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2041#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2042#[cfg_attr(feature = "serde", serde(tag = "type"))]
2043#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2044#[repr(u32)]
2045#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-06)"]
2046#[doc = "A data stream is not a fixed set of messages, but rather a      recommendation to the autopilot software. Individual autopilots may or may not obey      the recommended messages."]
2047pub enum MavDataStream {
2048    #[doc = "Enable all data streams"]
2049    MAV_DATA_STREAM_ALL = 0,
2050    #[doc = "Enable IMU_RAW, GPS_RAW, GPS_STATUS packets."]
2051    MAV_DATA_STREAM_RAW_SENSORS = 1,
2052    #[doc = "Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS"]
2053    MAV_DATA_STREAM_EXTENDED_STATUS = 2,
2054    #[doc = "Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW"]
2055    MAV_DATA_STREAM_RC_CHANNELS = 3,
2056    #[doc = "Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT."]
2057    MAV_DATA_STREAM_RAW_CONTROLLER = 4,
2058    #[doc = "Enable LOCAL_POSITION, GLOBAL_POSITION_INT messages."]
2059    MAV_DATA_STREAM_POSITION = 6,
2060    #[doc = "Dependent on the autopilot"]
2061    MAV_DATA_STREAM_EXTRA1 = 10,
2062    #[doc = "Dependent on the autopilot"]
2063    MAV_DATA_STREAM_EXTRA2 = 11,
2064    #[doc = "Dependent on the autopilot"]
2065    MAV_DATA_STREAM_EXTRA3 = 12,
2066}
2067impl MavDataStream {
2068    pub const DEFAULT: Self = Self::MAV_DATA_STREAM_ALL;
2069}
2070impl Default for MavDataStream {
2071    fn default() -> Self {
2072        Self::DEFAULT
2073    }
2074}
2075#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2076#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2077#[cfg_attr(feature = "serde", serde(tag = "type"))]
2078#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2079#[repr(u32)]
2080#[doc = "Enumeration of distance sensor types"]
2081pub enum MavDistanceSensor {
2082    #[doc = "Laser rangefinder, e.g. LightWare SF02/F or PulsedLight units"]
2083    MAV_DISTANCE_SENSOR_LASER = 0,
2084    #[doc = "Ultrasound rangefinder, e.g. MaxBotix units"]
2085    MAV_DISTANCE_SENSOR_ULTRASOUND = 1,
2086    #[doc = "Infrared rangefinder, e.g. Sharp units"]
2087    MAV_DISTANCE_SENSOR_INFRARED = 2,
2088    #[doc = "Radar type, e.g. uLanding units"]
2089    MAV_DISTANCE_SENSOR_RADAR = 3,
2090    #[doc = "Broken or unknown type, e.g. analog units"]
2091    MAV_DISTANCE_SENSOR_UNKNOWN = 4,
2092}
2093impl MavDistanceSensor {
2094    pub const DEFAULT: Self = Self::MAV_DISTANCE_SENSOR_LASER;
2095}
2096impl Default for MavDistanceSensor {
2097    fn default() -> Self {
2098        Self::DEFAULT
2099    }
2100}
2101#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2102#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2103#[cfg_attr(feature = "serde", serde(tag = "type"))]
2104#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2105#[repr(u32)]
2106#[doc = "Bitmap of options for the MAV_CMD_DO_REPOSITION"]
2107pub enum MavDoRepositionFlags {
2108    #[doc = "The aircraft should immediately transition into guided. This should not be set for follow me applications"]
2109    MAV_DO_REPOSITION_FLAGS_CHANGE_MODE = 1,
2110}
2111impl MavDoRepositionFlags {
2112    pub const DEFAULT: Self = Self::MAV_DO_REPOSITION_FLAGS_CHANGE_MODE;
2113}
2114impl Default for MavDoRepositionFlags {
2115    fn default() -> Self {
2116        Self::DEFAULT
2117    }
2118}
2119#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2120#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2121#[cfg_attr(feature = "serde", serde(tag = "type"))]
2122#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2123#[repr(u32)]
2124#[doc = "Enumeration of estimator types"]
2125pub enum MavEstimatorType {
2126    #[doc = "Unknown type of the estimator."]
2127    MAV_ESTIMATOR_TYPE_UNKNOWN = 0,
2128    #[doc = "This is a naive estimator without any real covariance feedback."]
2129    MAV_ESTIMATOR_TYPE_NAIVE = 1,
2130    #[doc = "Computer vision based estimate. Might be up to scale."]
2131    MAV_ESTIMATOR_TYPE_VISION = 2,
2132    #[doc = "Visual-inertial estimate."]
2133    MAV_ESTIMATOR_TYPE_VIO = 3,
2134    #[doc = "Plain GPS estimate."]
2135    MAV_ESTIMATOR_TYPE_GPS = 4,
2136    #[doc = "Estimator integrating GPS and inertial sensing."]
2137    MAV_ESTIMATOR_TYPE_GPS_INS = 5,
2138    #[doc = "Estimate from external motion capturing system."]
2139    MAV_ESTIMATOR_TYPE_MOCAP = 6,
2140    #[doc = "Estimator based on lidar sensor input."]
2141    MAV_ESTIMATOR_TYPE_LIDAR = 7,
2142    #[doc = "Estimator on autopilot."]
2143    MAV_ESTIMATOR_TYPE_AUTOPILOT = 8,
2144}
2145impl MavEstimatorType {
2146    pub const DEFAULT: Self = Self::MAV_ESTIMATOR_TYPE_UNKNOWN;
2147}
2148impl Default for MavEstimatorType {
2149    fn default() -> Self {
2150        Self::DEFAULT
2151    }
2152}
2153#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2154#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2155#[cfg_attr(feature = "serde", serde(tag = "type"))]
2156#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2157#[repr(u32)]
2158#[doc = "Flags for CURRENT_EVENT_SEQUENCE."]
2159pub enum MavEventCurrentSequenceFlags {
2160    #[doc = "A sequence reset has happened (e.g. vehicle reboot)."]
2161    MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET = 1,
2162}
2163impl MavEventCurrentSequenceFlags {
2164    pub const DEFAULT: Self = Self::MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET;
2165}
2166impl Default for MavEventCurrentSequenceFlags {
2167    fn default() -> Self {
2168        Self::DEFAULT
2169    }
2170}
2171#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2172#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2173#[cfg_attr(feature = "serde", serde(tag = "type"))]
2174#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2175#[repr(u32)]
2176#[doc = "Reason for an event error response."]
2177pub enum MavEventErrorReason {
2178    #[doc = "The requested event is not available (anymore)."]
2179    MAV_EVENT_ERROR_REASON_UNAVAILABLE = 0,
2180}
2181impl MavEventErrorReason {
2182    pub const DEFAULT: Self = Self::MAV_EVENT_ERROR_REASON_UNAVAILABLE;
2183}
2184impl Default for MavEventErrorReason {
2185    fn default() -> Self {
2186        Self::DEFAULT
2187    }
2188}
2189#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2190#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2191#[cfg_attr(feature = "serde", serde(tag = "type"))]
2192#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2193#[repr(u32)]
2194#[doc = "Coordinate frames used by MAVLink. Not all frames are supported by all commands, messages, or vehicles.        Global frames use the following naming conventions:       - \"GLOBAL\": Global coordinate frame with WGS84 latitude/longitude and altitude positive over mean sea level (MSL) by default.         The following modifiers may be used with \"GLOBAL\":         - \"RELATIVE_ALT\": Altitude is relative to the vehicle home position rather than MSL.         - \"TERRAIN_ALT\": Altitude is relative to ground level rather than MSL.         - \"INT\": Latitude/longitude (in degrees) are scaled by multiplying by 1E7.        Local frames use the following naming conventions:       - \"LOCAL\": Origin of local frame is fixed relative to earth. Unless otherwise specified this origin is the origin of the vehicle position-estimator (\"EKF\").       - \"BODY\": Origin of local frame travels with the vehicle. NOTE, \"BODY\" does NOT indicate alignment of frame axis with vehicle attitude.       - \"OFFSET\": Deprecated synonym for \"BODY\" (origin travels with the vehicle). Not to be used for new frames.        Some deprecated frames do not follow these conventions (e.g. MAV_FRAME_BODY_NED and MAV_FRAME_BODY_OFFSET_NED)."]
2195pub enum MavFrame {
2196    #[doc = "Global (WGS84) coordinate frame + altitude relative to mean sea level (MSL)."]
2197    MAV_FRAME_GLOBAL = 0,
2198    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth."]
2199    MAV_FRAME_LOCAL_NED = 1,
2200    #[doc = "NOT a coordinate frame, indicates a mission command."]
2201    MAV_FRAME_MISSION = 2,
2202    #[doc = "Global (WGS84) coordinate frame + altitude relative to the home position."]
2203    MAV_FRAME_GLOBAL_RELATIVE_ALT = 3,
2204    #[doc = "ENU local tangent frame (x: East, y: North, z: Up) with origin fixed relative to earth."]
2205    MAV_FRAME_LOCAL_ENU = 4,
2206    #[deprecated = "Use MAV_FRAME_GLOBAL in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL` (Deprecated since 2024-03)"]
2207    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to mean sea level (MSL)."]
2208    MAV_FRAME_GLOBAL_INT = 5,
2209    #[deprecated = "Use MAV_FRAME_GLOBAL_RELATIVE_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_RELATIVE_ALT` (Deprecated since 2024-03)"]
2210    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to the home position."]
2211    MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6,
2212    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin that travels with the vehicle."]
2213    MAV_FRAME_LOCAL_OFFSET_NED = 7,
2214    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2215    #[doc = "Same as MAV_FRAME_LOCAL_NED when used to represent position values. Same as MAV_FRAME_BODY_FRD when used with velocity/acceleration values."]
2216    MAV_FRAME_BODY_NED = 8,
2217    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2218    #[doc = "This is the same as MAV_FRAME_BODY_FRD."]
2219    MAV_FRAME_BODY_OFFSET_NED = 9,
2220    #[doc = "Global (WGS84) coordinate frame with AGL altitude (altitude at ground level)."]
2221    MAV_FRAME_GLOBAL_TERRAIN_ALT = 10,
2222    #[deprecated = "Use MAV_FRAME_GLOBAL_TERRAIN_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_TERRAIN_ALT` (Deprecated since 2024-03)"]
2223    #[doc = "Global (WGS84) coordinate frame (scaled) with AGL altitude (altitude at ground level)."]
2224    MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11,
2225    #[doc = "FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle."]
2226    MAV_FRAME_BODY_FRD = 12,
2227    #[deprecated = "  (Deprecated since 2019-04)"]
2228    #[doc = "MAV_FRAME_BODY_FLU - Body fixed frame of reference, Z-up (x: Forward, y: Left, z: Up)."]
2229    MAV_FRAME_RESERVED_13 = 13,
2230    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2231    #[doc = "MAV_FRAME_MOCAP_NED - Odometry local coordinate frame of data given by a motion capture system, Z-down (x: North, y: East, z: Down)."]
2232    MAV_FRAME_RESERVED_14 = 14,
2233    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2234    #[doc = "MAV_FRAME_MOCAP_ENU - Odometry local coordinate frame of data given by a motion capture system, Z-up (x: East, y: North, z: Up)."]
2235    MAV_FRAME_RESERVED_15 = 15,
2236    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2237    #[doc = "MAV_FRAME_VISION_NED - Odometry local coordinate frame of data given by a vision estimation system, Z-down (x: North, y: East, z: Down)."]
2238    MAV_FRAME_RESERVED_16 = 16,
2239    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2240    #[doc = "MAV_FRAME_VISION_ENU - Odometry local coordinate frame of data given by a vision estimation system, Z-up (x: East, y: North, z: Up)."]
2241    MAV_FRAME_RESERVED_17 = 17,
2242    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2243    #[doc = "MAV_FRAME_ESTIM_NED - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-down (x: North, y: East, z: Down)."]
2244    MAV_FRAME_RESERVED_18 = 18,
2245    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2246    #[doc = "MAV_FRAME_ESTIM_ENU - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-up (x: East, y: North, z: Up)."]
2247    MAV_FRAME_RESERVED_19 = 19,
2248    #[doc = "FRD local tangent frame (x: Forward, y: Right, z: Down) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2249    MAV_FRAME_LOCAL_FRD = 20,
2250    #[doc = "FLU local tangent frame (x: Forward, y: Left, z: Up) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2251    MAV_FRAME_LOCAL_FLU = 21,
2252}
2253impl MavFrame {
2254    pub const DEFAULT: Self = Self::MAV_FRAME_GLOBAL;
2255}
2256impl Default for MavFrame {
2257    fn default() -> Self {
2258        Self::DEFAULT
2259    }
2260}
2261#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2262#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2263#[cfg_attr(feature = "serde", serde(tag = "type"))]
2264#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2265#[repr(u32)]
2266#[doc = "MAV FTP error codes (<https://mavlink.io/en/services/ftp.html>)"]
2267pub enum MavFtpErr {
2268    #[doc = "None: No error"]
2269    MAV_FTP_ERR_NONE = 0,
2270    #[doc = "Fail: Unknown failure"]
2271    MAV_FTP_ERR_FAIL = 1,
2272    #[doc = "FailErrno: Command failed, Err number sent back in PayloadHeader.data[1]. \t\tThis is a file-system error number understood by the server operating system."]
2273    MAV_FTP_ERR_FAILERRNO = 2,
2274    #[doc = "InvalidDataSize: Payload size is invalid"]
2275    MAV_FTP_ERR_INVALIDDATASIZE = 3,
2276    #[doc = "InvalidSession: Session is not currently open"]
2277    MAV_FTP_ERR_INVALIDSESSION = 4,
2278    #[doc = "NoSessionsAvailable: All available sessions are already in use"]
2279    MAV_FTP_ERR_NOSESSIONSAVAILABLE = 5,
2280    #[doc = "EOF: Offset past end of file for ListDirectory and ReadFile commands"]
2281    MAV_FTP_ERR_EOF = 6,
2282    #[doc = "UnknownCommand: Unknown command / opcode"]
2283    MAV_FTP_ERR_UNKNOWNCOMMAND = 7,
2284    #[doc = "FileExists: File/directory already exists"]
2285    MAV_FTP_ERR_FILEEXISTS = 8,
2286    #[doc = "FileProtected: File/directory is write protected"]
2287    MAV_FTP_ERR_FILEPROTECTED = 9,
2288    #[doc = "FileNotFound: File/directory not found"]
2289    MAV_FTP_ERR_FILENOTFOUND = 10,
2290}
2291impl MavFtpErr {
2292    pub const DEFAULT: Self = Self::MAV_FTP_ERR_NONE;
2293}
2294impl Default for MavFtpErr {
2295    fn default() -> Self {
2296        Self::DEFAULT
2297    }
2298}
2299#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2300#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2301#[cfg_attr(feature = "serde", serde(tag = "type"))]
2302#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2303#[repr(u32)]
2304#[doc = "MAV FTP opcodes: <https://mavlink.io/en/services/ftp.html>"]
2305pub enum MavFtpOpcode {
2306    #[doc = "None. Ignored, always ACKed"]
2307    MAV_FTP_OPCODE_NONE = 0,
2308    #[doc = "TerminateSession: Terminates open Read session"]
2309    MAV_FTP_OPCODE_TERMINATESESSION = 1,
2310    #[doc = "ResetSessions: Terminates all open read sessions"]
2311    MAV_FTP_OPCODE_RESETSESSION = 2,
2312    #[doc = "ListDirectory. List files and directories in path from offset"]
2313    MAV_FTP_OPCODE_LISTDIRECTORY = 3,
2314    #[doc = "OpenFileRO: Opens file at path for reading, returns session"]
2315    MAV_FTP_OPCODE_OPENFILERO = 4,
2316    #[doc = "ReadFile: Reads size bytes from offset in session"]
2317    MAV_FTP_OPCODE_READFILE = 5,
2318    #[doc = "CreateFile: Creates file at path for writing, returns session"]
2319    MAV_FTP_OPCODE_CREATEFILE = 6,
2320    #[doc = "WriteFile: Writes size bytes to offset in session"]
2321    MAV_FTP_OPCODE_WRITEFILE = 7,
2322    #[doc = "RemoveFile: Remove file at path"]
2323    MAV_FTP_OPCODE_REMOVEFILE = 8,
2324    #[doc = "CreateDirectory: Creates directory at path"]
2325    MAV_FTP_OPCODE_CREATEDIRECTORY = 9,
2326    #[doc = "RemoveDirectory: Removes directory at path. The directory must be empty."]
2327    MAV_FTP_OPCODE_REMOVEDIRECTORY = 10,
2328    #[doc = "OpenFileWO: Opens file at path for writing, returns session"]
2329    MAV_FTP_OPCODE_OPENFILEWO = 11,
2330    #[doc = "TruncateFile: Truncate file at path to offset length"]
2331    MAV_FTP_OPCODE_TRUNCATEFILE = 12,
2332    #[doc = "Rename: Rename path1 to path2"]
2333    MAV_FTP_OPCODE_RENAME = 13,
2334    #[doc = "CalcFileCRC32: Calculate CRC32 for file at path"]
2335    MAV_FTP_OPCODE_CALCFILECRC = 14,
2336    #[doc = "BurstReadFile: Burst download session file"]
2337    MAV_FTP_OPCODE_BURSTREADFILE = 15,
2338    #[doc = "ACK: ACK response"]
2339    MAV_FTP_OPCODE_ACK = 128,
2340    #[doc = "NAK: NAK response"]
2341    MAV_FTP_OPCODE_NAK = 129,
2342}
2343impl MavFtpOpcode {
2344    pub const DEFAULT: Self = Self::MAV_FTP_OPCODE_NONE;
2345}
2346impl Default for MavFtpOpcode {
2347    fn default() -> Self {
2348        Self::DEFAULT
2349    }
2350}
2351#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2352#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2353#[cfg_attr(feature = "serde", serde(tag = "type"))]
2354#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2355#[repr(u32)]
2356#[doc = "Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates."]
2357pub enum MavFuelType {
2358    #[doc = "Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1)."]
2359    MAV_FUEL_TYPE_UNKNOWN = 0,
2360    #[doc = "A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second."]
2361    MAV_FUEL_TYPE_LIQUID = 1,
2362    #[doc = "A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s)."]
2363    MAV_FUEL_TYPE_GAS = 2,
2364}
2365impl MavFuelType {
2366    pub const DEFAULT: Self = Self::MAV_FUEL_TYPE_UNKNOWN;
2367}
2368impl Default for MavFuelType {
2369    fn default() -> Self {
2370        Self::DEFAULT
2371    }
2372}
2373bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report status/failure cases for a power generator (used in GENERATOR_STATUS). Note that FAULTS are conditions that cause the generator to fail. Warnings are conditions that require attention before the next use (they indicate the system is not operating properly)."] pub struct MavGeneratorStatusFlag : u64 { # [doc = "Generator is off."] const MAV_GENERATOR_STATUS_FLAG_OFF = 1 ; # [doc = "Generator is ready to start generating power."] const MAV_GENERATOR_STATUS_FLAG_READY = 2 ; # [doc = "Generator is generating power."] const MAV_GENERATOR_STATUS_FLAG_GENERATING = 4 ; # [doc = "Generator is charging the batteries (generating enough power to charge and provide the load)."] const MAV_GENERATOR_STATUS_FLAG_CHARGING = 8 ; # [doc = "Generator is operating at a reduced maximum power."] const MAV_GENERATOR_STATUS_FLAG_REDUCED_POWER = 16 ; # [doc = "Generator is providing the maximum output."] const MAV_GENERATOR_STATUS_FLAG_MAXPOWER = 32 ; # [doc = "Generator is near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_WARNING = 64 ; # [doc = "Generator hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_FAULT = 128 ; # [doc = "Power electronics are near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_WARNING = 256 ; # [doc = "Power electronics hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_FAULT = 512 ; # [doc = "Power electronics experienced a fault and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_FAULT = 1024 ; # [doc = "The power source supplying the generator failed e.g. mechanical generator stopped, tether is no longer providing power, solar cell is in shade, hydrogen reaction no longer happening."] const MAV_GENERATOR_STATUS_FLAG_POWERSOURCE_FAULT = 2048 ; # [doc = "Generator controller having communication problems."] const MAV_GENERATOR_STATUS_FLAG_COMMUNICATION_WARNING = 4096 ; # [doc = "Power electronic or generator cooling system error."] const MAV_GENERATOR_STATUS_FLAG_COOLING_WARNING = 8192 ; # [doc = "Generator controller power rail experienced a fault."] const MAV_GENERATOR_STATUS_FLAG_POWER_RAIL_FAULT = 16384 ; # [doc = "Generator controller exceeded the overcurrent threshold and shutdown to prevent damage."] const MAV_GENERATOR_STATUS_FLAG_OVERCURRENT_FAULT = 32768 ; # [doc = "Generator controller detected a high current going into the batteries and shutdown to prevent battery damage."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_OVERCHARGE_CURRENT_FAULT = 65536 ; # [doc = "Generator controller exceeded it's overvoltage threshold and shutdown to prevent it exceeding the voltage rating."] const MAV_GENERATOR_STATUS_FLAG_OVERVOLTAGE_FAULT = 131072 ; # [doc = "Batteries are under voltage (generator will not start)."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_UNDERVOLT_FAULT = 262144 ; # [doc = "Generator start is inhibited by e.g. a safety switch."] const MAV_GENERATOR_STATUS_FLAG_START_INHIBITED = 524288 ; # [doc = "Generator requires maintenance."] const MAV_GENERATOR_STATUS_FLAG_MAINTENANCE_REQUIRED = 1048576 ; # [doc = "Generator is not ready to generate yet."] const MAV_GENERATOR_STATUS_FLAG_WARMING_UP = 2097152 ; # [doc = "Generator is idle."] const MAV_GENERATOR_STATUS_FLAG_IDLE = 4194304 ; } }
2374impl MavGeneratorStatusFlag {
2375    pub const DEFAULT: Self = Self::MAV_GENERATOR_STATUS_FLAG_OFF;
2376}
2377impl Default for MavGeneratorStatusFlag {
2378    fn default() -> Self {
2379        Self::DEFAULT
2380    }
2381}
2382#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2383#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2384#[cfg_attr(feature = "serde", serde(tag = "type"))]
2385#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2386#[repr(u32)]
2387#[doc = "Actions that may be specified in MAV_CMD_OVERRIDE_GOTO to override mission execution."]
2388pub enum MavGoto {
2389    #[doc = "Hold at the current position."]
2390    MAV_GOTO_DO_HOLD = 0,
2391    #[doc = "Continue with the next item in mission execution."]
2392    MAV_GOTO_DO_CONTINUE = 1,
2393    #[doc = "Hold at the current position of the system"]
2394    MAV_GOTO_HOLD_AT_CURRENT_POSITION = 2,
2395    #[doc = "Hold at the position specified in the parameters of the DO_HOLD action"]
2396    MAV_GOTO_HOLD_AT_SPECIFIED_POSITION = 3,
2397}
2398impl MavGoto {
2399    pub const DEFAULT: Self = Self::MAV_GOTO_DO_HOLD;
2400}
2401impl Default for MavGoto {
2402    fn default() -> Self {
2403        Self::DEFAULT
2404    }
2405}
2406#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2407#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2408#[cfg_attr(feature = "serde", serde(tag = "type"))]
2409#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2410#[repr(u32)]
2411#[doc = "Enumeration of landed detector states"]
2412pub enum MavLandedState {
2413    #[doc = "MAV landed state is unknown"]
2414    MAV_LANDED_STATE_UNDEFINED = 0,
2415    #[doc = "MAV is landed (on ground)"]
2416    MAV_LANDED_STATE_ON_GROUND = 1,
2417    #[doc = "MAV is in air"]
2418    MAV_LANDED_STATE_IN_AIR = 2,
2419    #[doc = "MAV currently taking off"]
2420    MAV_LANDED_STATE_TAKEOFF = 3,
2421    #[doc = "MAV currently landing"]
2422    MAV_LANDED_STATE_LANDING = 4,
2423}
2424impl MavLandedState {
2425    pub const DEFAULT: Self = Self::MAV_LANDED_STATE_UNDEFINED;
2426}
2427impl Default for MavLandedState {
2428    fn default() -> Self {
2429        Self::DEFAULT
2430    }
2431}
2432#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2433#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2434#[cfg_attr(feature = "serde", serde(tag = "type"))]
2435#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2436#[repr(u32)]
2437#[doc = "Result of mission operation (in a MISSION_ACK message)."]
2438pub enum MavMissionResult {
2439    #[doc = "mission accepted OK"]
2440    MAV_MISSION_ACCEPTED = 0,
2441    #[doc = "Generic error / not accepting mission commands at all right now."]
2442    MAV_MISSION_ERROR = 1,
2443    #[doc = "Coordinate frame is not supported."]
2444    MAV_MISSION_UNSUPPORTED_FRAME = 2,
2445    #[doc = "Command is not supported."]
2446    MAV_MISSION_UNSUPPORTED = 3,
2447    #[doc = "Mission items exceed storage space."]
2448    MAV_MISSION_NO_SPACE = 4,
2449    #[doc = "One of the parameters has an invalid value."]
2450    MAV_MISSION_INVALID = 5,
2451    #[doc = "param1 has an invalid value."]
2452    MAV_MISSION_INVALID_PARAM1 = 6,
2453    #[doc = "param2 has an invalid value."]
2454    MAV_MISSION_INVALID_PARAM2 = 7,
2455    #[doc = "param3 has an invalid value."]
2456    MAV_MISSION_INVALID_PARAM3 = 8,
2457    #[doc = "param4 has an invalid value."]
2458    MAV_MISSION_INVALID_PARAM4 = 9,
2459    #[doc = "x / param5 has an invalid value."]
2460    MAV_MISSION_INVALID_PARAM5_X = 10,
2461    #[doc = "y / param6 has an invalid value."]
2462    MAV_MISSION_INVALID_PARAM6_Y = 11,
2463    #[doc = "z / param7 has an invalid value."]
2464    MAV_MISSION_INVALID_PARAM7 = 12,
2465    #[doc = "Mission item received out of sequence"]
2466    MAV_MISSION_INVALID_SEQUENCE = 13,
2467    #[doc = "Not accepting any mission commands from this communication partner."]
2468    MAV_MISSION_DENIED = 14,
2469    #[doc = "Current mission operation cancelled (e.g. mission upload, mission download)."]
2470    MAV_MISSION_OPERATION_CANCELLED = 15,
2471}
2472impl MavMissionResult {
2473    pub const DEFAULT: Self = Self::MAV_MISSION_ACCEPTED;
2474}
2475impl Default for MavMissionResult {
2476    fn default() -> Self {
2477        Self::DEFAULT
2478    }
2479}
2480#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2481#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2482#[cfg_attr(feature = "serde", serde(tag = "type"))]
2483#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2484#[repr(u32)]
2485#[doc = "Type of mission items being requested/sent in mission protocol."]
2486pub enum MavMissionType {
2487    #[doc = "Items are mission commands for main mission."]
2488    MAV_MISSION_TYPE_MISSION = 0,
2489    #[doc = "Specifies GeoFence area(s). Items are MAV_CMD_NAV_FENCE_ GeoFence items."]
2490    MAV_MISSION_TYPE_FENCE = 1,
2491    #[doc = "Specifies the rally points for the vehicle. Rally points are alternative RTL points. Items are MAV_CMD_NAV_RALLY_POINT rally point items."]
2492    MAV_MISSION_TYPE_RALLY = 2,
2493    #[doc = "Only used in MISSION_CLEAR_ALL to clear all mission types."]
2494    MAV_MISSION_TYPE_ALL = 255,
2495}
2496impl MavMissionType {
2497    pub const DEFAULT: Self = Self::MAV_MISSION_TYPE_MISSION;
2498}
2499impl Default for MavMissionType {
2500    fn default() -> Self {
2501        Self::DEFAULT
2502    }
2503}
2504#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2505#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2506#[cfg_attr(feature = "serde", serde(tag = "type"))]
2507#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2508#[repr(u32)]
2509#[doc = "These defines are predefined OR-combined mode flags. There is no need to use values from this enum, but it                simplifies the use of the mode flags. Note that manual input is enabled in all modes as a safety override."]
2510pub enum MavMode {
2511    #[doc = "System is not ready to fly, booting, calibrating, etc. No flag is set."]
2512    MAV_MODE_PREFLIGHT = 0,
2513    #[doc = "System is allowed to be active, under assisted RC control."]
2514    MAV_MODE_STABILIZE_DISARMED = 80,
2515    #[doc = "System is allowed to be active, under assisted RC control."]
2516    MAV_MODE_STABILIZE_ARMED = 208,
2517    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2518    MAV_MODE_MANUAL_DISARMED = 64,
2519    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2520    MAV_MODE_MANUAL_ARMED = 192,
2521    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2522    MAV_MODE_GUIDED_DISARMED = 88,
2523    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2524    MAV_MODE_GUIDED_ARMED = 216,
2525    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2526    MAV_MODE_AUTO_DISARMED = 92,
2527    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2528    MAV_MODE_AUTO_ARMED = 220,
2529    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2530    MAV_MODE_TEST_DISARMED = 66,
2531    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2532    MAV_MODE_TEST_ARMED = 194,
2533}
2534impl MavMode {
2535    pub const DEFAULT: Self = Self::MAV_MODE_PREFLIGHT;
2536}
2537impl Default for MavMode {
2538    fn default() -> Self {
2539        Self::DEFAULT
2540    }
2541}
2542bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags encode the MAV mode."] pub struct MavModeFlag : u8 { # [doc = "0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. Additional note: this flag is to be ignore when sent in the command MAV_CMD_DO_SET_MODE and MAV_CMD_COMPONENT_ARM_DISARM shall be used instead. The flag can still be used to report the armed state."] const MAV_MODE_FLAG_SAFETY_ARMED = 128 ; # [doc = "0b01000000 remote control input is enabled."] const MAV_MODE_FLAG_MANUAL_INPUT_ENABLED = 64 ; # [doc = "0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational."] const MAV_MODE_FLAG_HIL_ENABLED = 32 ; # [doc = "0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around."] const MAV_MODE_FLAG_STABILIZE_ENABLED = 16 ; # [doc = "0b00001000 guided mode enabled, system flies waypoints / mission items."] const MAV_MODE_FLAG_GUIDED_ENABLED = 8 ; # [doc = "0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation."] const MAV_MODE_FLAG_AUTO_ENABLED = 4 ; # [doc = "0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations."] const MAV_MODE_FLAG_TEST_ENABLED = 2 ; # [doc = "0b00000001 Reserved for future use."] const MAV_MODE_FLAG_CUSTOM_MODE_ENABLED = 1 ; } }
2543impl MavModeFlag {
2544    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_SAFETY_ARMED;
2545}
2546impl Default for MavModeFlag {
2547    fn default() -> Self {
2548        Self::DEFAULT
2549    }
2550}
2551#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2552#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2553#[cfg_attr(feature = "serde", serde(tag = "type"))]
2554#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2555#[repr(u32)]
2556#[doc = "These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not."]
2557pub enum MavModeFlagDecodePosition {
2558    #[doc = "First bit:  10000000"]
2559    MAV_MODE_FLAG_DECODE_POSITION_SAFETY = 128,
2560    #[doc = "Second bit: 01000000"]
2561    MAV_MODE_FLAG_DECODE_POSITION_MANUAL = 64,
2562    #[doc = "Third bit:  00100000"]
2563    MAV_MODE_FLAG_DECODE_POSITION_HIL = 32,
2564    #[doc = "Fourth bit: 00010000"]
2565    MAV_MODE_FLAG_DECODE_POSITION_STABILIZE = 16,
2566    #[doc = "Fifth bit:  00001000"]
2567    MAV_MODE_FLAG_DECODE_POSITION_GUIDED = 8,
2568    #[doc = "Sixth bit:   00000100"]
2569    MAV_MODE_FLAG_DECODE_POSITION_AUTO = 4,
2570    #[doc = "Seventh bit: 00000010"]
2571    MAV_MODE_FLAG_DECODE_POSITION_TEST = 2,
2572    #[doc = "Eighth bit: 00000001"]
2573    MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE = 1,
2574}
2575impl MavModeFlagDecodePosition {
2576    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_DECODE_POSITION_SAFETY;
2577}
2578impl Default for MavModeFlagDecodePosition {
2579    fn default() -> Self {
2580        Self::DEFAULT
2581    }
2582}
2583bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Mode properties."] pub struct MavModeProperty : u32 { # [doc = "If set, this mode is an advanced mode.           For example a rate-controlled manual mode might be advanced, whereas a position-controlled manual mode is not.           A GCS can optionally use this flag to configure the UI for its intended users."] const MAV_MODE_PROPERTY_ADVANCED = 1 ; # [doc = "If set, this mode should not be added to the list of selectable modes.           The mode might still be selected by the FC directly (for example as part of a failsafe)."] const MAV_MODE_PROPERTY_NOT_USER_SELECTABLE = 2 ; # [doc = "If set, this mode is automatically controlled (it may use but does not require a manual controller).           If unset the mode is a assumed to require user input (be a manual mode)."] const MAV_MODE_PROPERTY_AUTO_MODE = 4 ; } }
2584impl MavModeProperty {
2585    pub const DEFAULT: Self = Self::MAV_MODE_PROPERTY_ADVANCED;
2586}
2587impl Default for MavModeProperty {
2588    fn default() -> Self {
2589        Self::DEFAULT
2590    }
2591}
2592#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2593#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2594#[cfg_attr(feature = "serde", serde(tag = "type"))]
2595#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2596#[repr(u32)]
2597#[deprecated = " See `GIMBAL_MANAGER_FLAGS` (Deprecated since 2020-01)"]
2598#[doc = "Enumeration of possible mount operation modes. This message is used by obsolete/deprecated gimbal messages."]
2599pub enum MavMountMode {
2600    #[doc = "Load and keep safe position (Roll,Pitch,Yaw) from permanent memory and stop stabilization"]
2601    MAV_MOUNT_MODE_RETRACT = 0,
2602    #[doc = "Load and keep neutral position (Roll,Pitch,Yaw) from permanent memory."]
2603    MAV_MOUNT_MODE_NEUTRAL = 1,
2604    #[doc = "Load neutral position and start MAVLink Roll,Pitch,Yaw control with stabilization"]
2605    MAV_MOUNT_MODE_MAVLINK_TARGETING = 2,
2606    #[doc = "Load neutral position and start RC Roll,Pitch,Yaw control with stabilization"]
2607    MAV_MOUNT_MODE_RC_TARGETING = 3,
2608    #[doc = "Load neutral position and start to point to Lat,Lon,Alt"]
2609    MAV_MOUNT_MODE_GPS_POINT = 4,
2610    #[doc = "Gimbal tracks system with specified system ID"]
2611    MAV_MOUNT_MODE_SYSID_TARGET = 5,
2612    #[doc = "Gimbal tracks home position"]
2613    MAV_MOUNT_MODE_HOME_LOCATION = 6,
2614}
2615impl MavMountMode {
2616    pub const DEFAULT: Self = Self::MAV_MOUNT_MODE_RETRACT;
2617}
2618impl Default for MavMountMode {
2619    fn default() -> Self {
2620        Self::DEFAULT
2621    }
2622}
2623#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2624#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2625#[cfg_attr(feature = "serde", serde(tag = "type"))]
2626#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2627#[repr(u32)]
2628pub enum MavOdidArmStatus {
2629    #[doc = "Passing arming checks."]
2630    MAV_ODID_ARM_STATUS_GOOD_TO_ARM = 0,
2631    #[doc = "Generic arming failure, see error string for details."]
2632    MAV_ODID_ARM_STATUS_PRE_ARM_FAIL_GENERIC = 1,
2633}
2634impl MavOdidArmStatus {
2635    pub const DEFAULT: Self = Self::MAV_ODID_ARM_STATUS_GOOD_TO_ARM;
2636}
2637impl Default for MavOdidArmStatus {
2638    fn default() -> Self {
2639        Self::DEFAULT
2640    }
2641}
2642#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2643#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2644#[cfg_attr(feature = "serde", serde(tag = "type"))]
2645#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2646#[repr(u32)]
2647pub enum MavOdidAuthType {
2648    #[doc = "No authentication type is specified."]
2649    MAV_ODID_AUTH_TYPE_NONE = 0,
2650    #[doc = "Signature for the UAS (Unmanned Aircraft System) ID."]
2651    MAV_ODID_AUTH_TYPE_UAS_ID_SIGNATURE = 1,
2652    #[doc = "Signature for the Operator ID."]
2653    MAV_ODID_AUTH_TYPE_OPERATOR_ID_SIGNATURE = 2,
2654    #[doc = "Signature for the entire message set."]
2655    MAV_ODID_AUTH_TYPE_MESSAGE_SET_SIGNATURE = 3,
2656    #[doc = "Authentication is provided by Network Remote ID."]
2657    MAV_ODID_AUTH_TYPE_NETWORK_REMOTE_ID = 4,
2658    #[doc = "The exact authentication type is indicated by the first byte of authentication_data and these type values are managed by ICAO."]
2659    MAV_ODID_AUTH_TYPE_SPECIFIC_AUTHENTICATION = 5,
2660}
2661impl MavOdidAuthType {
2662    pub const DEFAULT: Self = Self::MAV_ODID_AUTH_TYPE_NONE;
2663}
2664impl Default for MavOdidAuthType {
2665    fn default() -> Self {
2666        Self::DEFAULT
2667    }
2668}
2669#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2670#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2671#[cfg_attr(feature = "serde", serde(tag = "type"))]
2672#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2673#[repr(u32)]
2674pub enum MavOdidCategoryEu {
2675    #[doc = "The category for the UA, according to the EU specification, is undeclared."]
2676    MAV_ODID_CATEGORY_EU_UNDECLARED = 0,
2677    #[doc = "The category for the UA, according to the EU specification, is the Open category."]
2678    MAV_ODID_CATEGORY_EU_OPEN = 1,
2679    #[doc = "The category for the UA, according to the EU specification, is the Specific category."]
2680    MAV_ODID_CATEGORY_EU_SPECIFIC = 2,
2681    #[doc = "The category for the UA, according to the EU specification, is the Certified category."]
2682    MAV_ODID_CATEGORY_EU_CERTIFIED = 3,
2683}
2684impl MavOdidCategoryEu {
2685    pub const DEFAULT: Self = Self::MAV_ODID_CATEGORY_EU_UNDECLARED;
2686}
2687impl Default for MavOdidCategoryEu {
2688    fn default() -> Self {
2689        Self::DEFAULT
2690    }
2691}
2692#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2693#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2694#[cfg_attr(feature = "serde", serde(tag = "type"))]
2695#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2696#[repr(u32)]
2697pub enum MavOdidClassEu {
2698    #[doc = "The class for the UA, according to the EU specification, is undeclared."]
2699    MAV_ODID_CLASS_EU_UNDECLARED = 0,
2700    #[doc = "The class for the UA, according to the EU specification, is Class 0."]
2701    MAV_ODID_CLASS_EU_CLASS_0 = 1,
2702    #[doc = "The class for the UA, according to the EU specification, is Class 1."]
2703    MAV_ODID_CLASS_EU_CLASS_1 = 2,
2704    #[doc = "The class for the UA, according to the EU specification, is Class 2."]
2705    MAV_ODID_CLASS_EU_CLASS_2 = 3,
2706    #[doc = "The class for the UA, according to the EU specification, is Class 3."]
2707    MAV_ODID_CLASS_EU_CLASS_3 = 4,
2708    #[doc = "The class for the UA, according to the EU specification, is Class 4."]
2709    MAV_ODID_CLASS_EU_CLASS_4 = 5,
2710    #[doc = "The class for the UA, according to the EU specification, is Class 5."]
2711    MAV_ODID_CLASS_EU_CLASS_5 = 6,
2712    #[doc = "The class for the UA, according to the EU specification, is Class 6."]
2713    MAV_ODID_CLASS_EU_CLASS_6 = 7,
2714}
2715impl MavOdidClassEu {
2716    pub const DEFAULT: Self = Self::MAV_ODID_CLASS_EU_UNDECLARED;
2717}
2718impl Default for MavOdidClassEu {
2719    fn default() -> Self {
2720        Self::DEFAULT
2721    }
2722}
2723#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2724#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2725#[cfg_attr(feature = "serde", serde(tag = "type"))]
2726#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2727#[repr(u32)]
2728pub enum MavOdidClassificationType {
2729    #[doc = "The classification type for the UA is undeclared."]
2730    MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED = 0,
2731    #[doc = "The classification type for the UA follows EU (European Union) specifications."]
2732    MAV_ODID_CLASSIFICATION_TYPE_EU = 1,
2733}
2734impl MavOdidClassificationType {
2735    pub const DEFAULT: Self = Self::MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED;
2736}
2737impl Default for MavOdidClassificationType {
2738    fn default() -> Self {
2739        Self::DEFAULT
2740    }
2741}
2742#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2743#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2744#[cfg_attr(feature = "serde", serde(tag = "type"))]
2745#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2746#[repr(u32)]
2747pub enum MavOdidDescType {
2748    #[doc = "Optional free-form text description of the purpose of the flight."]
2749    MAV_ODID_DESC_TYPE_TEXT = 0,
2750    #[doc = "Optional additional clarification when status == MAV_ODID_STATUS_EMERGENCY."]
2751    MAV_ODID_DESC_TYPE_EMERGENCY = 1,
2752    #[doc = "Optional additional clarification when status != MAV_ODID_STATUS_EMERGENCY."]
2753    MAV_ODID_DESC_TYPE_EXTENDED_STATUS = 2,
2754}
2755impl MavOdidDescType {
2756    pub const DEFAULT: Self = Self::MAV_ODID_DESC_TYPE_TEXT;
2757}
2758impl Default for MavOdidDescType {
2759    fn default() -> Self {
2760        Self::DEFAULT
2761    }
2762}
2763#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2764#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2765#[cfg_attr(feature = "serde", serde(tag = "type"))]
2766#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2767#[repr(u32)]
2768pub enum MavOdidHeightRef {
2769    #[doc = "The height field is relative to the take-off location."]
2770    MAV_ODID_HEIGHT_REF_OVER_TAKEOFF = 0,
2771    #[doc = "The height field is relative to ground."]
2772    MAV_ODID_HEIGHT_REF_OVER_GROUND = 1,
2773}
2774impl MavOdidHeightRef {
2775    pub const DEFAULT: Self = Self::MAV_ODID_HEIGHT_REF_OVER_TAKEOFF;
2776}
2777impl Default for MavOdidHeightRef {
2778    fn default() -> Self {
2779        Self::DEFAULT
2780    }
2781}
2782#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2783#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2784#[cfg_attr(feature = "serde", serde(tag = "type"))]
2785#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2786#[repr(u32)]
2787pub enum MavOdidHorAcc {
2788    #[doc = "The horizontal accuracy is unknown."]
2789    MAV_ODID_HOR_ACC_UNKNOWN = 0,
2790    #[doc = "The horizontal accuracy is smaller than 10 Nautical Miles. 18.52 km."]
2791    MAV_ODID_HOR_ACC_10NM = 1,
2792    #[doc = "The horizontal accuracy is smaller than 4 Nautical Miles. 7.408 km."]
2793    MAV_ODID_HOR_ACC_4NM = 2,
2794    #[doc = "The horizontal accuracy is smaller than 2 Nautical Miles. 3.704 km."]
2795    MAV_ODID_HOR_ACC_2NM = 3,
2796    #[doc = "The horizontal accuracy is smaller than 1 Nautical Miles. 1.852 km."]
2797    MAV_ODID_HOR_ACC_1NM = 4,
2798    #[doc = "The horizontal accuracy is smaller than 0.5 Nautical Miles. 926 m."]
2799    MAV_ODID_HOR_ACC_0_5NM = 5,
2800    #[doc = "The horizontal accuracy is smaller than 0.3 Nautical Miles. 555.6 m."]
2801    MAV_ODID_HOR_ACC_0_3NM = 6,
2802    #[doc = "The horizontal accuracy is smaller than 0.1 Nautical Miles. 185.2 m."]
2803    MAV_ODID_HOR_ACC_0_1NM = 7,
2804    #[doc = "The horizontal accuracy is smaller than 0.05 Nautical Miles. 92.6 m."]
2805    MAV_ODID_HOR_ACC_0_05NM = 8,
2806    #[doc = "The horizontal accuracy is smaller than 30 meter."]
2807    MAV_ODID_HOR_ACC_30_METER = 9,
2808    #[doc = "The horizontal accuracy is smaller than 10 meter."]
2809    MAV_ODID_HOR_ACC_10_METER = 10,
2810    #[doc = "The horizontal accuracy is smaller than 3 meter."]
2811    MAV_ODID_HOR_ACC_3_METER = 11,
2812    #[doc = "The horizontal accuracy is smaller than 1 meter."]
2813    MAV_ODID_HOR_ACC_1_METER = 12,
2814}
2815impl MavOdidHorAcc {
2816    pub const DEFAULT: Self = Self::MAV_ODID_HOR_ACC_UNKNOWN;
2817}
2818impl Default for MavOdidHorAcc {
2819    fn default() -> Self {
2820        Self::DEFAULT
2821    }
2822}
2823#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2824#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2825#[cfg_attr(feature = "serde", serde(tag = "type"))]
2826#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2827#[repr(u32)]
2828pub enum MavOdidIdType {
2829    #[doc = "No type defined."]
2830    MAV_ODID_ID_TYPE_NONE = 0,
2831    #[doc = "Manufacturer Serial Number (ANSI/CTA-2063 format)."]
2832    MAV_ODID_ID_TYPE_SERIAL_NUMBER = 1,
2833    #[doc = "CAA (Civil Aviation Authority) registered ID. Format: [ICAO Country Code].[CAA Assigned ID]."]
2834    MAV_ODID_ID_TYPE_CAA_REGISTRATION_ID = 2,
2835    #[doc = "UTM (Unmanned Traffic Management) assigned UUID (RFC4122)."]
2836    MAV_ODID_ID_TYPE_UTM_ASSIGNED_UUID = 3,
2837    #[doc = "A 20 byte ID for a specific flight/session. The exact ID type is indicated by the first byte of uas_id and these type values are managed by ICAO."]
2838    MAV_ODID_ID_TYPE_SPECIFIC_SESSION_ID = 4,
2839}
2840impl MavOdidIdType {
2841    pub const DEFAULT: Self = Self::MAV_ODID_ID_TYPE_NONE;
2842}
2843impl Default for MavOdidIdType {
2844    fn default() -> Self {
2845        Self::DEFAULT
2846    }
2847}
2848#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2849#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2850#[cfg_attr(feature = "serde", serde(tag = "type"))]
2851#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2852#[repr(u32)]
2853pub enum MavOdidOperatorIdType {
2854    #[doc = "CAA (Civil Aviation Authority) registered operator ID."]
2855    MAV_ODID_OPERATOR_ID_TYPE_CAA = 0,
2856}
2857impl MavOdidOperatorIdType {
2858    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_ID_TYPE_CAA;
2859}
2860impl Default for MavOdidOperatorIdType {
2861    fn default() -> Self {
2862        Self::DEFAULT
2863    }
2864}
2865#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2866#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2867#[cfg_attr(feature = "serde", serde(tag = "type"))]
2868#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2869#[repr(u32)]
2870pub enum MavOdidOperatorLocationType {
2871    #[doc = "The location/altitude of the operator is the same as the take-off location."]
2872    MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF = 0,
2873    #[doc = "The location/altitude of the operator is dynamic. E.g. based on live GNSS data."]
2874    MAV_ODID_OPERATOR_LOCATION_TYPE_LIVE_GNSS = 1,
2875    #[doc = "The location/altitude of the operator are fixed values."]
2876    MAV_ODID_OPERATOR_LOCATION_TYPE_FIXED = 2,
2877}
2878impl MavOdidOperatorLocationType {
2879    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF;
2880}
2881impl Default for MavOdidOperatorLocationType {
2882    fn default() -> Self {
2883        Self::DEFAULT
2884    }
2885}
2886#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2887#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2888#[cfg_attr(feature = "serde", serde(tag = "type"))]
2889#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2890#[repr(u32)]
2891pub enum MavOdidSpeedAcc {
2892    #[doc = "The speed accuracy is unknown."]
2893    MAV_ODID_SPEED_ACC_UNKNOWN = 0,
2894    #[doc = "The speed accuracy is smaller than 10 meters per second."]
2895    MAV_ODID_SPEED_ACC_10_METERS_PER_SECOND = 1,
2896    #[doc = "The speed accuracy is smaller than 3 meters per second."]
2897    MAV_ODID_SPEED_ACC_3_METERS_PER_SECOND = 2,
2898    #[doc = "The speed accuracy is smaller than 1 meters per second."]
2899    MAV_ODID_SPEED_ACC_1_METERS_PER_SECOND = 3,
2900    #[doc = "The speed accuracy is smaller than 0.3 meters per second."]
2901    MAV_ODID_SPEED_ACC_0_3_METERS_PER_SECOND = 4,
2902}
2903impl MavOdidSpeedAcc {
2904    pub const DEFAULT: Self = Self::MAV_ODID_SPEED_ACC_UNKNOWN;
2905}
2906impl Default for MavOdidSpeedAcc {
2907    fn default() -> Self {
2908        Self::DEFAULT
2909    }
2910}
2911#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2912#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2913#[cfg_attr(feature = "serde", serde(tag = "type"))]
2914#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2915#[repr(u32)]
2916pub enum MavOdidStatus {
2917    #[doc = "The status of the (UA) Unmanned Aircraft is undefined."]
2918    MAV_ODID_STATUS_UNDECLARED = 0,
2919    #[doc = "The UA is on the ground."]
2920    MAV_ODID_STATUS_GROUND = 1,
2921    #[doc = "The UA is in the air."]
2922    MAV_ODID_STATUS_AIRBORNE = 2,
2923    #[doc = "The UA is having an emergency."]
2924    MAV_ODID_STATUS_EMERGENCY = 3,
2925    #[doc = "The remote ID system is failing or unreliable in some way."]
2926    MAV_ODID_STATUS_REMOTE_ID_SYSTEM_FAILURE = 4,
2927}
2928impl MavOdidStatus {
2929    pub const DEFAULT: Self = Self::MAV_ODID_STATUS_UNDECLARED;
2930}
2931impl Default for MavOdidStatus {
2932    fn default() -> Self {
2933        Self::DEFAULT
2934    }
2935}
2936#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2937#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2938#[cfg_attr(feature = "serde", serde(tag = "type"))]
2939#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2940#[repr(u32)]
2941pub enum MavOdidTimeAcc {
2942    #[doc = "The timestamp accuracy is unknown."]
2943    MAV_ODID_TIME_ACC_UNKNOWN = 0,
2944    #[doc = "The timestamp accuracy is smaller than or equal to 0.1 second."]
2945    MAV_ODID_TIME_ACC_0_1_SECOND = 1,
2946    #[doc = "The timestamp accuracy is smaller than or equal to 0.2 second."]
2947    MAV_ODID_TIME_ACC_0_2_SECOND = 2,
2948    #[doc = "The timestamp accuracy is smaller than or equal to 0.3 second."]
2949    MAV_ODID_TIME_ACC_0_3_SECOND = 3,
2950    #[doc = "The timestamp accuracy is smaller than or equal to 0.4 second."]
2951    MAV_ODID_TIME_ACC_0_4_SECOND = 4,
2952    #[doc = "The timestamp accuracy is smaller than or equal to 0.5 second."]
2953    MAV_ODID_TIME_ACC_0_5_SECOND = 5,
2954    #[doc = "The timestamp accuracy is smaller than or equal to 0.6 second."]
2955    MAV_ODID_TIME_ACC_0_6_SECOND = 6,
2956    #[doc = "The timestamp accuracy is smaller than or equal to 0.7 second."]
2957    MAV_ODID_TIME_ACC_0_7_SECOND = 7,
2958    #[doc = "The timestamp accuracy is smaller than or equal to 0.8 second."]
2959    MAV_ODID_TIME_ACC_0_8_SECOND = 8,
2960    #[doc = "The timestamp accuracy is smaller than or equal to 0.9 second."]
2961    MAV_ODID_TIME_ACC_0_9_SECOND = 9,
2962    #[doc = "The timestamp accuracy is smaller than or equal to 1.0 second."]
2963    MAV_ODID_TIME_ACC_1_0_SECOND = 10,
2964    #[doc = "The timestamp accuracy is smaller than or equal to 1.1 second."]
2965    MAV_ODID_TIME_ACC_1_1_SECOND = 11,
2966    #[doc = "The timestamp accuracy is smaller than or equal to 1.2 second."]
2967    MAV_ODID_TIME_ACC_1_2_SECOND = 12,
2968    #[doc = "The timestamp accuracy is smaller than or equal to 1.3 second."]
2969    MAV_ODID_TIME_ACC_1_3_SECOND = 13,
2970    #[doc = "The timestamp accuracy is smaller than or equal to 1.4 second."]
2971    MAV_ODID_TIME_ACC_1_4_SECOND = 14,
2972    #[doc = "The timestamp accuracy is smaller than or equal to 1.5 second."]
2973    MAV_ODID_TIME_ACC_1_5_SECOND = 15,
2974}
2975impl MavOdidTimeAcc {
2976    pub const DEFAULT: Self = Self::MAV_ODID_TIME_ACC_UNKNOWN;
2977}
2978impl Default for MavOdidTimeAcc {
2979    fn default() -> Self {
2980        Self::DEFAULT
2981    }
2982}
2983#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2984#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2985#[cfg_attr(feature = "serde", serde(tag = "type"))]
2986#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2987#[repr(u32)]
2988pub enum MavOdidUaType {
2989    #[doc = "No UA (Unmanned Aircraft) type defined."]
2990    MAV_ODID_UA_TYPE_NONE = 0,
2991    #[doc = "Aeroplane/Airplane. Fixed wing."]
2992    MAV_ODID_UA_TYPE_AEROPLANE = 1,
2993    #[doc = "Helicopter or multirotor."]
2994    MAV_ODID_UA_TYPE_HELICOPTER_OR_MULTIROTOR = 2,
2995    #[doc = "Gyroplane."]
2996    MAV_ODID_UA_TYPE_GYROPLANE = 3,
2997    #[doc = "VTOL (Vertical Take-Off and Landing). Fixed wing aircraft that can take off vertically."]
2998    MAV_ODID_UA_TYPE_HYBRID_LIFT = 4,
2999    #[doc = "Ornithopter."]
3000    MAV_ODID_UA_TYPE_ORNITHOPTER = 5,
3001    #[doc = "Glider."]
3002    MAV_ODID_UA_TYPE_GLIDER = 6,
3003    #[doc = "Kite."]
3004    MAV_ODID_UA_TYPE_KITE = 7,
3005    #[doc = "Free Balloon."]
3006    MAV_ODID_UA_TYPE_FREE_BALLOON = 8,
3007    #[doc = "Captive Balloon."]
3008    MAV_ODID_UA_TYPE_CAPTIVE_BALLOON = 9,
3009    #[doc = "Airship. E.g. a blimp."]
3010    MAV_ODID_UA_TYPE_AIRSHIP = 10,
3011    #[doc = "Free Fall/Parachute (unpowered)."]
3012    MAV_ODID_UA_TYPE_FREE_FALL_PARACHUTE = 11,
3013    #[doc = "Rocket."]
3014    MAV_ODID_UA_TYPE_ROCKET = 12,
3015    #[doc = "Tethered powered aircraft."]
3016    MAV_ODID_UA_TYPE_TETHERED_POWERED_AIRCRAFT = 13,
3017    #[doc = "Ground Obstacle."]
3018    MAV_ODID_UA_TYPE_GROUND_OBSTACLE = 14,
3019    #[doc = "Other type of aircraft not listed earlier."]
3020    MAV_ODID_UA_TYPE_OTHER = 15,
3021}
3022impl MavOdidUaType {
3023    pub const DEFAULT: Self = Self::MAV_ODID_UA_TYPE_NONE;
3024}
3025impl Default for MavOdidUaType {
3026    fn default() -> Self {
3027        Self::DEFAULT
3028    }
3029}
3030#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3031#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3032#[cfg_attr(feature = "serde", serde(tag = "type"))]
3033#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3034#[repr(u32)]
3035pub enum MavOdidVerAcc {
3036    #[doc = "The vertical accuracy is unknown."]
3037    MAV_ODID_VER_ACC_UNKNOWN = 0,
3038    #[doc = "The vertical accuracy is smaller than 150 meter."]
3039    MAV_ODID_VER_ACC_150_METER = 1,
3040    #[doc = "The vertical accuracy is smaller than 45 meter."]
3041    MAV_ODID_VER_ACC_45_METER = 2,
3042    #[doc = "The vertical accuracy is smaller than 25 meter."]
3043    MAV_ODID_VER_ACC_25_METER = 3,
3044    #[doc = "The vertical accuracy is smaller than 10 meter."]
3045    MAV_ODID_VER_ACC_10_METER = 4,
3046    #[doc = "The vertical accuracy is smaller than 3 meter."]
3047    MAV_ODID_VER_ACC_3_METER = 5,
3048    #[doc = "The vertical accuracy is smaller than 1 meter."]
3049    MAV_ODID_VER_ACC_1_METER = 6,
3050}
3051impl MavOdidVerAcc {
3052    pub const DEFAULT: Self = Self::MAV_ODID_VER_ACC_UNKNOWN;
3053}
3054impl Default for MavOdidVerAcc {
3055    fn default() -> Self {
3056        Self::DEFAULT
3057    }
3058}
3059#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3060#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3061#[cfg_attr(feature = "serde", serde(tag = "type"))]
3062#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3063#[repr(u32)]
3064#[doc = "Specifies the datatype of a MAVLink extended parameter."]
3065pub enum MavParamExtType {
3066    #[doc = "8-bit unsigned integer"]
3067    MAV_PARAM_EXT_TYPE_UINT8 = 1,
3068    #[doc = "8-bit signed integer"]
3069    MAV_PARAM_EXT_TYPE_INT8 = 2,
3070    #[doc = "16-bit unsigned integer"]
3071    MAV_PARAM_EXT_TYPE_UINT16 = 3,
3072    #[doc = "16-bit signed integer"]
3073    MAV_PARAM_EXT_TYPE_INT16 = 4,
3074    #[doc = "32-bit unsigned integer"]
3075    MAV_PARAM_EXT_TYPE_UINT32 = 5,
3076    #[doc = "32-bit signed integer"]
3077    MAV_PARAM_EXT_TYPE_INT32 = 6,
3078    #[doc = "64-bit unsigned integer"]
3079    MAV_PARAM_EXT_TYPE_UINT64 = 7,
3080    #[doc = "64-bit signed integer"]
3081    MAV_PARAM_EXT_TYPE_INT64 = 8,
3082    #[doc = "32-bit floating-point"]
3083    MAV_PARAM_EXT_TYPE_REAL32 = 9,
3084    #[doc = "64-bit floating-point"]
3085    MAV_PARAM_EXT_TYPE_REAL64 = 10,
3086    #[doc = "Custom Type"]
3087    MAV_PARAM_EXT_TYPE_CUSTOM = 11,
3088}
3089impl MavParamExtType {
3090    pub const DEFAULT: Self = Self::MAV_PARAM_EXT_TYPE_UINT8;
3091}
3092impl Default for MavParamExtType {
3093    fn default() -> Self {
3094        Self::DEFAULT
3095    }
3096}
3097#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3098#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3099#[cfg_attr(feature = "serde", serde(tag = "type"))]
3100#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3101#[repr(u32)]
3102#[doc = "Specifies the datatype of a MAVLink parameter."]
3103pub enum MavParamType {
3104    #[doc = "8-bit unsigned integer"]
3105    MAV_PARAM_TYPE_UINT8 = 1,
3106    #[doc = "8-bit signed integer"]
3107    MAV_PARAM_TYPE_INT8 = 2,
3108    #[doc = "16-bit unsigned integer"]
3109    MAV_PARAM_TYPE_UINT16 = 3,
3110    #[doc = "16-bit signed integer"]
3111    MAV_PARAM_TYPE_INT16 = 4,
3112    #[doc = "32-bit unsigned integer"]
3113    MAV_PARAM_TYPE_UINT32 = 5,
3114    #[doc = "32-bit signed integer"]
3115    MAV_PARAM_TYPE_INT32 = 6,
3116    #[doc = "64-bit unsigned integer"]
3117    MAV_PARAM_TYPE_UINT64 = 7,
3118    #[doc = "64-bit signed integer"]
3119    MAV_PARAM_TYPE_INT64 = 8,
3120    #[doc = "32-bit floating-point"]
3121    MAV_PARAM_TYPE_REAL32 = 9,
3122    #[doc = "64-bit floating-point"]
3123    MAV_PARAM_TYPE_REAL64 = 10,
3124}
3125impl MavParamType {
3126    pub const DEFAULT: Self = Self::MAV_PARAM_TYPE_UINT8;
3127}
3128impl Default for MavParamType {
3129    fn default() -> Self {
3130        Self::DEFAULT
3131    }
3132}
3133bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Power supply status flags (bitmask)"] pub struct MavPowerStatus : u16 { # [doc = "main brick power supply valid"] const MAV_POWER_STATUS_BRICK_VALID = 1 ; # [doc = "main servo power supply valid for FMU"] const MAV_POWER_STATUS_SERVO_VALID = 2 ; # [doc = "USB power is connected"] const MAV_POWER_STATUS_USB_CONNECTED = 4 ; # [doc = "peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_OVERCURRENT = 8 ; # [doc = "hi-power peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_HIPOWER_OVERCURRENT = 16 ; # [doc = "Power status has changed since boot"] const MAV_POWER_STATUS_CHANGED = 32 ; } }
3134impl MavPowerStatus {
3135    pub const DEFAULT: Self = Self::MAV_POWER_STATUS_BRICK_VALID;
3136}
3137impl Default for MavPowerStatus {
3138    fn default() -> Self {
3139        Self::DEFAULT
3140    }
3141}
3142bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmask of (optional) autopilot capabilities (64 bit). If a bit is set, the autopilot supports this capability."] pub struct MavProtocolCapability : u64 { # [doc = "Autopilot supports the MISSION_ITEM float message type.           Note that MISSION_ITEM is deprecated, and autopilots should use MISSION_INT instead."] const MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT = 1 ; # [deprecated = " See `MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST` (Deprecated since 2022-03)"] # [doc = "Autopilot supports the new param float message type."] const MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT = 2 ; # [doc = "Autopilot supports MISSION_ITEM_INT scaled integer message type.           Note that this flag must always be set if missions are supported, because missions must always use MISSION_ITEM_INT (rather than MISSION_ITEM, which is deprecated)."] const MAV_PROTOCOL_CAPABILITY_MISSION_INT = 4 ; # [doc = "Autopilot supports COMMAND_INT scaled integer message type."] const MAV_PROTOCOL_CAPABILITY_COMMAND_INT = 8 ; # [doc = "Parameter protocol uses byte-wise encoding of parameter values into param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE = 16 ; # [doc = "Autopilot supports the File Transfer Protocol v1: <https://mavlink.io/en/services/ftp.html>."] const MAV_PROTOCOL_CAPABILITY_FTP = 32 ; # [doc = "Autopilot supports commanding attitude offboard."] const MAV_PROTOCOL_CAPABILITY_SET_ATTITUDE_TARGET = 64 ; # [doc = "Autopilot supports commanding position and velocity targets in local NED frame."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_LOCAL_NED = 128 ; # [doc = "Autopilot supports commanding position and velocity targets in global scaled integers."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_GLOBAL_INT = 256 ; # [doc = "Autopilot supports terrain protocol / data handling."] const MAV_PROTOCOL_CAPABILITY_TERRAIN = 512 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED3 = 1024 ; # [doc = "Autopilot supports the MAV_CMD_DO_FLIGHTTERMINATION command (flight termination)."] const MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION = 2048 ; # [doc = "Autopilot supports onboard compass calibration."] const MAV_PROTOCOL_CAPABILITY_COMPASS_CALIBRATION = 4096 ; # [doc = "Autopilot supports MAVLink version 2."] const MAV_PROTOCOL_CAPABILITY_MAVLINK2 = 8192 ; # [doc = "Autopilot supports mission fence protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_FENCE = 16384 ; # [doc = "Autopilot supports mission rally point protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_RALLY = 32768 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED2 = 65536 ; # [doc = "Parameter protocol uses C-cast of parameter values to set the param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST = 131072 ; # [doc = "This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other messages can be requested."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER = 262144 ; # [doc = "Component supports locking control to a particular GCS independent of its system (via MAV_CMD_REQUEST_OPERATOR_CONTROL)."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL = 524288 ; } }
3143impl MavProtocolCapability {
3144    pub const DEFAULT: Self = Self::MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT;
3145}
3146impl Default for MavProtocolCapability {
3147    fn default() -> Self {
3148        Self::DEFAULT
3149    }
3150}
3151#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3152#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3153#[cfg_attr(feature = "serde", serde(tag = "type"))]
3154#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3155#[repr(u32)]
3156#[doc = "Result from a MAVLink command (MAV_CMD)"]
3157pub enum MavResult {
3158    #[doc = "Command is valid (is supported and has valid parameters), and was executed."]
3159    MAV_RESULT_ACCEPTED = 0,
3160    #[doc = "Command is valid, but cannot be executed at this time. This is used to indicate a problem that should be fixed just by waiting (e.g. a state machine is busy, can't arm because have not got GPS lock, etc.). Retrying later should work."]
3161    MAV_RESULT_TEMPORARILY_REJECTED = 1,
3162    #[doc = "Command is invalid (is supported but has invalid parameters). Retrying same command and parameters will not work."]
3163    MAV_RESULT_DENIED = 2,
3164    #[doc = "Command is not supported (unknown)."]
3165    MAV_RESULT_UNSUPPORTED = 3,
3166    #[doc = "Command is valid, but execution has failed. This is used to indicate any non-temporary or unexpected problem, i.e. any problem that must be fixed before the command can succeed/be retried. For example, attempting to write a file when out of memory, attempting to arm when sensors are not calibrated, etc."]
3167    MAV_RESULT_FAILED = 4,
3168    #[doc = "Command is valid and is being executed. This will be followed by further progress updates, i.e. the component may send further COMMAND_ACK messages with result MAV_RESULT_IN_PROGRESS (at a rate decided by the implementation), and must terminate by sending a COMMAND_ACK message with final result of the operation. The COMMAND_ACK.progress field can be used to indicate the progress of the operation."]
3169    MAV_RESULT_IN_PROGRESS = 5,
3170    #[doc = "Command has been cancelled (as a result of receiving a COMMAND_CANCEL message)."]
3171    MAV_RESULT_CANCELLED = 6,
3172    #[doc = "Command is only accepted when sent as a COMMAND_LONG."]
3173    MAV_RESULT_COMMAND_LONG_ONLY = 7,
3174    #[doc = "Command is only accepted when sent as a COMMAND_INT."]
3175    MAV_RESULT_COMMAND_INT_ONLY = 8,
3176    #[doc = "Command is invalid because a frame is required and the specified frame is not supported."]
3177    MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME = 9,
3178}
3179impl MavResult {
3180    pub const DEFAULT: Self = Self::MAV_RESULT_ACCEPTED;
3181}
3182impl Default for MavResult {
3183    fn default() -> Self {
3184        Self::DEFAULT
3185    }
3186}
3187#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3188#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3189#[cfg_attr(feature = "serde", serde(tag = "type"))]
3190#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3191#[repr(u32)]
3192#[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
3193#[doc = "The ROI (region of interest) for the vehicle. This can be                 be used by the vehicle for camera/vehicle attitude alignment (see                 MAV_CMD_NAV_ROI)."]
3194pub enum MavRoi {
3195    #[doc = "No region of interest."]
3196    MAV_ROI_NONE = 0,
3197    #[doc = "Point toward next waypoint, with optional pitch/roll/yaw offset."]
3198    MAV_ROI_WPNEXT = 1,
3199    #[doc = "Point toward given waypoint."]
3200    MAV_ROI_WPINDEX = 2,
3201    #[doc = "Point toward fixed location."]
3202    MAV_ROI_LOCATION = 3,
3203    #[doc = "Point toward of given id."]
3204    MAV_ROI_TARGET = 4,
3205}
3206impl MavRoi {
3207    pub const DEFAULT: Self = Self::MAV_ROI_NONE;
3208}
3209impl Default for MavRoi {
3210    fn default() -> Self {
3211        Self::DEFAULT
3212    }
3213}
3214#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3215#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3216#[cfg_attr(feature = "serde", serde(tag = "type"))]
3217#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3218#[repr(u32)]
3219#[doc = "Enumeration of sensor orientation, according to its rotations"]
3220pub enum MavSensorOrientation {
3221    #[doc = "Roll: 0, Pitch: 0, Yaw: 0"]
3222    MAV_SENSOR_ROTATION_NONE = 0,
3223    #[doc = "Roll: 0, Pitch: 0, Yaw: 45"]
3224    MAV_SENSOR_ROTATION_YAW_45 = 1,
3225    #[doc = "Roll: 0, Pitch: 0, Yaw: 90"]
3226    MAV_SENSOR_ROTATION_YAW_90 = 2,
3227    #[doc = "Roll: 0, Pitch: 0, Yaw: 135"]
3228    MAV_SENSOR_ROTATION_YAW_135 = 3,
3229    #[doc = "Roll: 0, Pitch: 0, Yaw: 180"]
3230    MAV_SENSOR_ROTATION_YAW_180 = 4,
3231    #[doc = "Roll: 0, Pitch: 0, Yaw: 225"]
3232    MAV_SENSOR_ROTATION_YAW_225 = 5,
3233    #[doc = "Roll: 0, Pitch: 0, Yaw: 270"]
3234    MAV_SENSOR_ROTATION_YAW_270 = 6,
3235    #[doc = "Roll: 0, Pitch: 0, Yaw: 315"]
3236    MAV_SENSOR_ROTATION_YAW_315 = 7,
3237    #[doc = "Roll: 180, Pitch: 0, Yaw: 0"]
3238    MAV_SENSOR_ROTATION_ROLL_180 = 8,
3239    #[doc = "Roll: 180, Pitch: 0, Yaw: 45"]
3240    MAV_SENSOR_ROTATION_ROLL_180_YAW_45 = 9,
3241    #[doc = "Roll: 180, Pitch: 0, Yaw: 90"]
3242    MAV_SENSOR_ROTATION_ROLL_180_YAW_90 = 10,
3243    #[doc = "Roll: 180, Pitch: 0, Yaw: 135"]
3244    MAV_SENSOR_ROTATION_ROLL_180_YAW_135 = 11,
3245    #[doc = "Roll: 0, Pitch: 180, Yaw: 0"]
3246    MAV_SENSOR_ROTATION_PITCH_180 = 12,
3247    #[doc = "Roll: 180, Pitch: 0, Yaw: 225"]
3248    MAV_SENSOR_ROTATION_ROLL_180_YAW_225 = 13,
3249    #[doc = "Roll: 180, Pitch: 0, Yaw: 270"]
3250    MAV_SENSOR_ROTATION_ROLL_180_YAW_270 = 14,
3251    #[doc = "Roll: 180, Pitch: 0, Yaw: 315"]
3252    MAV_SENSOR_ROTATION_ROLL_180_YAW_315 = 15,
3253    #[doc = "Roll: 90, Pitch: 0, Yaw: 0"]
3254    MAV_SENSOR_ROTATION_ROLL_90 = 16,
3255    #[doc = "Roll: 90, Pitch: 0, Yaw: 45"]
3256    MAV_SENSOR_ROTATION_ROLL_90_YAW_45 = 17,
3257    #[doc = "Roll: 90, Pitch: 0, Yaw: 90"]
3258    MAV_SENSOR_ROTATION_ROLL_90_YAW_90 = 18,
3259    #[doc = "Roll: 90, Pitch: 0, Yaw: 135"]
3260    MAV_SENSOR_ROTATION_ROLL_90_YAW_135 = 19,
3261    #[doc = "Roll: 270, Pitch: 0, Yaw: 0"]
3262    MAV_SENSOR_ROTATION_ROLL_270 = 20,
3263    #[doc = "Roll: 270, Pitch: 0, Yaw: 45"]
3264    MAV_SENSOR_ROTATION_ROLL_270_YAW_45 = 21,
3265    #[doc = "Roll: 270, Pitch: 0, Yaw: 90"]
3266    MAV_SENSOR_ROTATION_ROLL_270_YAW_90 = 22,
3267    #[doc = "Roll: 270, Pitch: 0, Yaw: 135"]
3268    MAV_SENSOR_ROTATION_ROLL_270_YAW_135 = 23,
3269    #[doc = "Roll: 0, Pitch: 90, Yaw: 0"]
3270    MAV_SENSOR_ROTATION_PITCH_90 = 24,
3271    #[doc = "Roll: 0, Pitch: 270, Yaw: 0"]
3272    MAV_SENSOR_ROTATION_PITCH_270 = 25,
3273    #[doc = "Roll: 0, Pitch: 180, Yaw: 90"]
3274    MAV_SENSOR_ROTATION_PITCH_180_YAW_90 = 26,
3275    #[doc = "Roll: 0, Pitch: 180, Yaw: 270"]
3276    MAV_SENSOR_ROTATION_PITCH_180_YAW_270 = 27,
3277    #[doc = "Roll: 90, Pitch: 90, Yaw: 0"]
3278    MAV_SENSOR_ROTATION_ROLL_90_PITCH_90 = 28,
3279    #[doc = "Roll: 180, Pitch: 90, Yaw: 0"]
3280    MAV_SENSOR_ROTATION_ROLL_180_PITCH_90 = 29,
3281    #[doc = "Roll: 270, Pitch: 90, Yaw: 0"]
3282    MAV_SENSOR_ROTATION_ROLL_270_PITCH_90 = 30,
3283    #[doc = "Roll: 90, Pitch: 180, Yaw: 0"]
3284    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180 = 31,
3285    #[doc = "Roll: 270, Pitch: 180, Yaw: 0"]
3286    MAV_SENSOR_ROTATION_ROLL_270_PITCH_180 = 32,
3287    #[doc = "Roll: 90, Pitch: 270, Yaw: 0"]
3288    MAV_SENSOR_ROTATION_ROLL_90_PITCH_270 = 33,
3289    #[doc = "Roll: 180, Pitch: 270, Yaw: 0"]
3290    MAV_SENSOR_ROTATION_ROLL_180_PITCH_270 = 34,
3291    #[doc = "Roll: 270, Pitch: 270, Yaw: 0"]
3292    MAV_SENSOR_ROTATION_ROLL_270_PITCH_270 = 35,
3293    #[doc = "Roll: 90, Pitch: 180, Yaw: 90"]
3294    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180_YAW_90 = 36,
3295    #[doc = "Roll: 90, Pitch: 0, Yaw: 270"]
3296    MAV_SENSOR_ROTATION_ROLL_90_YAW_270 = 37,
3297    #[doc = "Roll: 90, Pitch: 68, Yaw: 293"]
3298    MAV_SENSOR_ROTATION_ROLL_90_PITCH_68_YAW_293 = 38,
3299    #[doc = "Pitch: 315"]
3300    MAV_SENSOR_ROTATION_PITCH_315 = 39,
3301    #[doc = "Roll: 90, Pitch: 315"]
3302    MAV_SENSOR_ROTATION_ROLL_90_PITCH_315 = 40,
3303    #[doc = "Custom orientation"]
3304    MAV_SENSOR_ROTATION_CUSTOM = 100,
3305}
3306impl MavSensorOrientation {
3307    pub const DEFAULT: Self = Self::MAV_SENSOR_ROTATION_NONE;
3308}
3309impl Default for MavSensorOrientation {
3310    fn default() -> Self {
3311        Self::DEFAULT
3312    }
3313}
3314#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3315#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3316#[cfg_attr(feature = "serde", serde(tag = "type"))]
3317#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3318#[repr(u32)]
3319#[doc = "Indicates the severity level, generally used for status messages to indicate their relative urgency. Based on RFC-5424 using expanded definitions at: <http://www.kiwisyslog.com/kb/info:-syslog-message-levels/>."]
3320pub enum MavSeverity {
3321    #[doc = "System is unusable. This is a \"panic\" condition."]
3322    MAV_SEVERITY_EMERGENCY = 0,
3323    #[doc = "Action should be taken immediately. Indicates error in non-critical systems."]
3324    MAV_SEVERITY_ALERT = 1,
3325    #[doc = "Action must be taken immediately. Indicates failure in a primary system."]
3326    MAV_SEVERITY_CRITICAL = 2,
3327    #[doc = "Indicates an error in secondary/redundant systems."]
3328    MAV_SEVERITY_ERROR = 3,
3329    #[doc = "Indicates about a possible future error if this is not resolved within a given timeframe. Example would be a low battery warning."]
3330    MAV_SEVERITY_WARNING = 4,
3331    #[doc = "An unusual event has occurred, though not an error condition. This should be investigated for the root cause."]
3332    MAV_SEVERITY_NOTICE = 5,
3333    #[doc = "Normal operational messages. Useful for logging. No action is required for these messages."]
3334    MAV_SEVERITY_INFO = 6,
3335    #[doc = "Useful non-operational messages that can assist in debugging. These should not occur during normal operation."]
3336    MAV_SEVERITY_DEBUG = 7,
3337}
3338impl MavSeverity {
3339    pub const DEFAULT: Self = Self::MAV_SEVERITY_EMERGENCY;
3340}
3341impl Default for MavSeverity {
3342    fn default() -> Self {
3343        Self::DEFAULT
3344    }
3345}
3346#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3347#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3348#[cfg_attr(feature = "serde", serde(tag = "type"))]
3349#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3350#[repr(u32)]
3351#[doc = "Standard modes with a well understood meaning across flight stacks and vehicle types.         For example, most flight stack have the concept of a \"return\" or \"RTL\" mode that takes a vehicle to safety, even though the precise mechanics of this mode may differ.         The modes supported by a flight stack can be queried using AVAILABLE_MODES and set using MAV_CMD_DO_SET_STANDARD_MODE.         The current mode is streamed in CURRENT_MODE.         See <https://mavlink.io/en/services/standard_modes.html>"]
3352pub enum MavStandardMode {
3353    #[doc = "Non standard mode.           This may be used when reporting the mode if the current flight mode is not a standard mode."]
3354    MAV_STANDARD_MODE_NON_STANDARD = 0,
3355    #[doc = "Position mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold both position and altitude against wind and external forces.           This mode can only be set by vehicles that can hold a fixed position.           Multicopter (MC) vehicles actively brake and hold both position and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to multicopter mode (if needed) but otherwise behave in the same way as MC vehicles.           Fixed-wing (FW) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3356    MAV_STANDARD_MODE_POSITION_HOLD = 1,
3357    #[doc = "Orbit (manual).           Position-controlled and stabilized manual mode.           The vehicle circles around a fixed setpoint in the horizontal plane at a particular radius, altitude, and direction.           Flight stacks may further allow manual control over the setpoint position, radius, direction, speed, and/or altitude of the circle, but this is not mandated.           Flight stacks may support the [MAV_CMD_DO_ORBIT](<https://mavlink.io/en/messages/common.html#MAV_CMD_DO_ORBIT>) for changing the orbit parameters.           MC and FW vehicles may support this mode.           Hybrid MC/FW (\"VTOL\") vehicles may support this mode in MC/FW or both modes; if the mode is not supported by the current configuration the vehicle should transition to the supported configuration.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3358    MAV_STANDARD_MODE_ORBIT = 2,
3359    #[doc = "Cruise mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their original track against wind and external forces.           Fixed-wing (FW) vehicles level orientation and maintain current track and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to FW mode (if needed) but otherwise behave in the same way as MC vehicles.           Multicopter (MC) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3360    MAV_STANDARD_MODE_CRUISE = 3,
3361    #[doc = "Altitude hold (manual).           Altitude-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their altitude.           MC vehicles continue with existing momentum and may move with wind (or other external forces).           FW vehicles continue with current heading, but may be moved off-track by wind.           Hybrid MC/FW (\"VTOL\") vehicles behave according to their current configuration/mode (FW or MC).           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3362    MAV_STANDARD_MODE_ALTITUDE_HOLD = 4,
3363    #[doc = "Safe recovery mode (auto).           Automatic mode that takes vehicle to a predefined safe location via a safe flight path, and may also automatically land the vehicle.           This mode is more commonly referred to as RTL and/or or Smart RTL.           The precise return location, flight path, and landing behaviour depend on vehicle configuration and type.           For example, the vehicle might return to the home/launch location, a rally point, or the start of a mission landing, it might follow a direct path, mission path, or breadcrumb path, and land using a mission landing pattern or some other kind of descent."]
3364    MAV_STANDARD_MODE_SAFE_RECOVERY = 5,
3365    #[doc = "Mission mode (automatic).           Automatic mode that executes MAVLink missions.           Missions are executed from the current waypoint as soon as the mode is enabled."]
3366    MAV_STANDARD_MODE_MISSION = 6,
3367    #[doc = "Land mode (auto).           Automatic mode that lands the vehicle at the current location.           The precise landing behaviour depends on vehicle configuration and type."]
3368    MAV_STANDARD_MODE_LAND = 7,
3369    #[doc = "Takeoff mode (auto).           Automatic takeoff mode.           The precise takeoff behaviour depends on vehicle configuration and type."]
3370    MAV_STANDARD_MODE_TAKEOFF = 8,
3371}
3372impl MavStandardMode {
3373    pub const DEFAULT: Self = Self::MAV_STANDARD_MODE_NON_STANDARD;
3374}
3375impl Default for MavStandardMode {
3376    fn default() -> Self {
3377        Self::DEFAULT
3378    }
3379}
3380#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3381#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3382#[cfg_attr(feature = "serde", serde(tag = "type"))]
3383#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3384#[repr(u32)]
3385pub enum MavState {
3386    #[doc = "Uninitialized system, state is unknown."]
3387    MAV_STATE_UNINIT = 0,
3388    #[doc = "System is booting up."]
3389    MAV_STATE_BOOT = 1,
3390    #[doc = "System is calibrating and not flight-ready."]
3391    MAV_STATE_CALIBRATING = 2,
3392    #[doc = "System is grounded and on standby. It can be launched any time."]
3393    MAV_STATE_STANDBY = 3,
3394    #[doc = "System is active and might be already airborne. Motors are engaged."]
3395    MAV_STATE_ACTIVE = 4,
3396    #[doc = "System is in a non-normal flight mode (failsafe). It can however still navigate."]
3397    MAV_STATE_CRITICAL = 5,
3398    #[doc = "System is in a non-normal flight mode (failsafe). It lost control over parts or over the whole airframe. It is in mayday and going down."]
3399    MAV_STATE_EMERGENCY = 6,
3400    #[doc = "System just initialized its power-down sequence, will shut down now."]
3401    MAV_STATE_POWEROFF = 7,
3402    #[doc = "System is terminating itself (failsafe or commanded)."]
3403    MAV_STATE_FLIGHT_TERMINATION = 8,
3404}
3405impl MavState {
3406    pub const DEFAULT: Self = Self::MAV_STATE_UNINIT;
3407}
3408impl Default for MavState {
3409    fn default() -> Self {
3410        Self::DEFAULT
3411    }
3412}
3413bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message."] pub struct MavSysStatusSensor : u32 { # [doc = "0x01 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO = 1 ; # [doc = "0x02 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL = 2 ; # [doc = "0x04 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG = 4 ; # [doc = "0x08 absolute pressure"] const MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE = 8 ; # [doc = "0x10 differential pressure"] const MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE = 16 ; # [doc = "0x20 GPS"] const MAV_SYS_STATUS_SENSOR_GPS = 32 ; # [doc = "0x40 optical flow"] const MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW = 64 ; # [doc = "0x80 computer vision position"] const MAV_SYS_STATUS_SENSOR_VISION_POSITION = 128 ; # [doc = "0x100 laser based position"] const MAV_SYS_STATUS_SENSOR_LASER_POSITION = 256 ; # [doc = "0x200 external ground truth (Vicon or Leica)"] const MAV_SYS_STATUS_SENSOR_EXTERNAL_GROUND_TRUTH = 512 ; # [doc = "0x400 3D angular rate control"] const MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL = 1024 ; # [doc = "0x800 attitude stabilization"] const MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION = 2048 ; # [doc = "0x1000 yaw position"] const MAV_SYS_STATUS_SENSOR_YAW_POSITION = 4096 ; # [doc = "0x2000 z/altitude control"] const MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL = 8192 ; # [doc = "0x4000 x/y position control"] const MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL = 16384 ; # [doc = "0x8000 motor outputs / control"] const MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS = 32768 ; # [doc = "0x10000 RC receiver"] const MAV_SYS_STATUS_SENSOR_RC_RECEIVER = 65536 ; # [doc = "0x20000 2nd 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO2 = 131072 ; # [doc = "0x40000 2nd 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL2 = 262144 ; # [doc = "0x80000 2nd 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG2 = 524288 ; # [doc = "0x100000 geofence"] const MAV_SYS_STATUS_GEOFENCE = 1048576 ; # [doc = "0x200000 AHRS subsystem health"] const MAV_SYS_STATUS_AHRS = 2097152 ; # [doc = "0x400000 Terrain subsystem health"] const MAV_SYS_STATUS_TERRAIN = 4194304 ; # [doc = "0x800000 Motors are reversed"] const MAV_SYS_STATUS_REVERSE_MOTOR = 8388608 ; # [doc = "0x1000000 Logging"] const MAV_SYS_STATUS_LOGGING = 16777216 ; # [doc = "0x2000000 Battery"] const MAV_SYS_STATUS_SENSOR_BATTERY = 33554432 ; # [doc = "0x4000000 Proximity"] const MAV_SYS_STATUS_SENSOR_PROXIMITY = 67108864 ; # [doc = "0x8000000 Satellite Communication"] const MAV_SYS_STATUS_SENSOR_SATCOM = 134217728 ; # [doc = "0x10000000 pre-arm check status. Always healthy when armed"] const MAV_SYS_STATUS_PREARM_CHECK = 268435456 ; # [doc = "0x20000000 Avoidance/collision prevention"] const MAV_SYS_STATUS_OBSTACLE_AVOIDANCE = 536870912 ; # [doc = "0x40000000 propulsion (actuator, esc, motor or propellor)"] const MAV_SYS_STATUS_SENSOR_PROPULSION = 1073741824 ; # [doc = "0x80000000 Extended bit-field are used for further sensor status bits (needs to be set in onboard_control_sensors_present only)"] const MAV_SYS_STATUS_EXTENSION_USED = 2147483648 ; } }
3414impl MavSysStatusSensor {
3415    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_SENSOR_3D_GYRO;
3416}
3417impl Default for MavSysStatusSensor {
3418    fn default() -> Self {
3419        Self::DEFAULT
3420    }
3421}
3422bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message in the extended fields."] pub struct MavSysStatusSensorExtended : u32 { # [doc = "0x01 Recovery system (parachute, balloon, retracts etc)"] const MAV_SYS_STATUS_RECOVERY_SYSTEM = 1 ; } }
3423impl MavSysStatusSensorExtended {
3424    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_RECOVERY_SYSTEM;
3425}
3426impl Default for MavSysStatusSensorExtended {
3427    fn default() -> Self {
3428        Self::DEFAULT
3429    }
3430}
3431#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3432#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3433#[cfg_attr(feature = "serde", serde(tag = "type"))]
3434#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3435#[repr(u32)]
3436pub enum MavTunnelPayloadType {
3437    #[doc = "Encoding of payload unknown."]
3438    MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN = 0,
3439    #[doc = "Registered for STorM32 gimbal controller."]
3440    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED0 = 200,
3441    #[doc = "Registered for STorM32 gimbal controller."]
3442    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED1 = 201,
3443    #[doc = "Registered for STorM32 gimbal controller."]
3444    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED2 = 202,
3445    #[doc = "Registered for STorM32 gimbal controller."]
3446    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED3 = 203,
3447    #[doc = "Registered for STorM32 gimbal controller."]
3448    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED4 = 204,
3449    #[doc = "Registered for STorM32 gimbal controller."]
3450    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED5 = 205,
3451    #[doc = "Registered for STorM32 gimbal controller."]
3452    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED6 = 206,
3453    #[doc = "Registered for STorM32 gimbal controller."]
3454    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED7 = 207,
3455    #[doc = "Registered for STorM32 gimbal controller."]
3456    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED8 = 208,
3457    #[doc = "Registered for STorM32 gimbal controller."]
3458    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED9 = 209,
3459    #[doc = "Registered for ModalAI remote OSD protocol."]
3460    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_REMOTE_OSD = 210,
3461    #[doc = "Registered for ModalAI ESC UART passthru protocol."]
3462    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_ESC_UART_PASSTHRU = 211,
3463    #[doc = "Registered for ModalAI vendor use."]
3464    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_IO_UART_PASSTHRU = 212,
3465}
3466impl MavTunnelPayloadType {
3467    pub const DEFAULT: Self = Self::MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN;
3468}
3469impl Default for MavTunnelPayloadType {
3470    fn default() -> Self {
3471        Self::DEFAULT
3472    }
3473}
3474#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3475#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3476#[cfg_attr(feature = "serde", serde(tag = "type"))]
3477#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3478#[repr(u32)]
3479#[doc = "MAVLINK component type reported in HEARTBEAT message. Flight controllers must report the type of the vehicle on which they are mounted (e.g. MAV_TYPE_OCTOROTOR). All other components must report a value appropriate for their type (e.g. a camera must use MAV_TYPE_CAMERA)."]
3480pub enum MavType {
3481    #[doc = "Generic micro air vehicle"]
3482    MAV_TYPE_GENERIC = 0,
3483    #[doc = "Fixed wing aircraft."]
3484    MAV_TYPE_FIXED_WING = 1,
3485    #[doc = "Quadrotor"]
3486    MAV_TYPE_QUADROTOR = 2,
3487    #[doc = "Coaxial helicopter"]
3488    MAV_TYPE_COAXIAL = 3,
3489    #[doc = "Normal helicopter with tail rotor."]
3490    MAV_TYPE_HELICOPTER = 4,
3491    #[doc = "Ground installation"]
3492    MAV_TYPE_ANTENNA_TRACKER = 5,
3493    #[doc = "Operator control unit / ground control station"]
3494    MAV_TYPE_GCS = 6,
3495    #[doc = "Airship, controlled"]
3496    MAV_TYPE_AIRSHIP = 7,
3497    #[doc = "Free balloon, uncontrolled"]
3498    MAV_TYPE_FREE_BALLOON = 8,
3499    #[doc = "Rocket"]
3500    MAV_TYPE_ROCKET = 9,
3501    #[doc = "Ground rover"]
3502    MAV_TYPE_GROUND_ROVER = 10,
3503    #[doc = "Surface vessel, boat, ship"]
3504    MAV_TYPE_SURFACE_BOAT = 11,
3505    #[doc = "Submarine"]
3506    MAV_TYPE_SUBMARINE = 12,
3507    #[doc = "Hexarotor"]
3508    MAV_TYPE_HEXAROTOR = 13,
3509    #[doc = "Octorotor"]
3510    MAV_TYPE_OCTOROTOR = 14,
3511    #[doc = "Tricopter"]
3512    MAV_TYPE_TRICOPTER = 15,
3513    #[doc = "Flapping wing"]
3514    MAV_TYPE_FLAPPING_WING = 16,
3515    #[doc = "Kite"]
3516    MAV_TYPE_KITE = 17,
3517    #[doc = "Onboard companion controller"]
3518    MAV_TYPE_ONBOARD_CONTROLLER = 18,
3519    #[doc = "Two-rotor Tailsitter VTOL that additionally uses control surfaces in vertical operation. Note, value previously named MAV_TYPE_VTOL_DUOROTOR."]
3520    MAV_TYPE_VTOL_TAILSITTER_DUOROTOR = 19,
3521    #[doc = "Quad-rotor Tailsitter VTOL using a V-shaped quad config in vertical operation. Note: value previously named MAV_TYPE_VTOL_QUADROTOR."]
3522    MAV_TYPE_VTOL_TAILSITTER_QUADROTOR = 20,
3523    #[doc = "Tiltrotor VTOL. Fuselage and wings stay (nominally) horizontal in all flight phases. It able to tilt (some) rotors to provide thrust in cruise flight."]
3524    MAV_TYPE_VTOL_TILTROTOR = 21,
3525    #[doc = "VTOL with separate fixed rotors for hover and cruise flight. Fuselage and wings stay (nominally) horizontal in all flight phases."]
3526    MAV_TYPE_VTOL_FIXEDROTOR = 22,
3527    #[doc = "Tailsitter VTOL. Fuselage and wings orientation changes depending on flight phase: vertical for hover, horizontal for cruise. Use more specific VTOL MAV_TYPE_VTOL_TAILSITTER_DUOROTOR or MAV_TYPE_VTOL_TAILSITTER_QUADROTOR if appropriate."]
3528    MAV_TYPE_VTOL_TAILSITTER = 23,
3529    #[doc = "Tiltwing VTOL. Fuselage stays horizontal in all flight phases. The whole wing, along with any attached engine, can tilt between vertical and horizontal mode."]
3530    MAV_TYPE_VTOL_TILTWING = 24,
3531    #[doc = "VTOL reserved 5"]
3532    MAV_TYPE_VTOL_RESERVED5 = 25,
3533    #[doc = "Gimbal"]
3534    MAV_TYPE_GIMBAL = 26,
3535    #[doc = "ADSB system"]
3536    MAV_TYPE_ADSB = 27,
3537    #[doc = "Steerable, nonrigid airfoil"]
3538    MAV_TYPE_PARAFOIL = 28,
3539    #[doc = "Dodecarotor"]
3540    MAV_TYPE_DODECAROTOR = 29,
3541    #[doc = "Camera"]
3542    MAV_TYPE_CAMERA = 30,
3543    #[doc = "Charging station"]
3544    MAV_TYPE_CHARGING_STATION = 31,
3545    #[doc = "FLARM collision avoidance system"]
3546    MAV_TYPE_FLARM = 32,
3547    #[doc = "Servo"]
3548    MAV_TYPE_SERVO = 33,
3549    #[doc = "Open Drone ID. See <https://mavlink.io/en/services/opendroneid.html>."]
3550    MAV_TYPE_ODID = 34,
3551    #[doc = "Decarotor"]
3552    MAV_TYPE_DECAROTOR = 35,
3553    #[doc = "Battery"]
3554    MAV_TYPE_BATTERY = 36,
3555    #[doc = "Parachute"]
3556    MAV_TYPE_PARACHUTE = 37,
3557    #[doc = "Log"]
3558    MAV_TYPE_LOG = 38,
3559    #[doc = "OSD"]
3560    MAV_TYPE_OSD = 39,
3561    #[doc = "IMU"]
3562    MAV_TYPE_IMU = 40,
3563    #[doc = "GPS"]
3564    MAV_TYPE_GPS = 41,
3565    #[doc = "Winch"]
3566    MAV_TYPE_WINCH = 42,
3567    #[doc = "Generic multirotor that does not fit into a specific type or whose type is unknown"]
3568    MAV_TYPE_GENERIC_MULTIROTOR = 43,
3569    #[doc = "Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
3570    MAV_TYPE_ILLUMINATOR = 44,
3571    #[doc = "Orbiter spacecraft. Includes satellites orbiting terrestrial and extra-terrestrial bodies. Follows NASA Spacecraft Classification."]
3572    MAV_TYPE_SPACECRAFT_ORBITER = 45,
3573}
3574impl MavType {
3575    pub const DEFAULT: Self = Self::MAV_TYPE_GENERIC;
3576}
3577impl Default for MavType {
3578    fn default() -> Self {
3579        Self::DEFAULT
3580    }
3581}
3582#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3583#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3584#[cfg_attr(feature = "serde", serde(tag = "type"))]
3585#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3586#[repr(u32)]
3587#[doc = "Enumeration of VTOL states"]
3588pub enum MavVtolState {
3589    #[doc = "MAV is not configured as VTOL"]
3590    MAV_VTOL_STATE_UNDEFINED = 0,
3591    #[doc = "VTOL is in transition from multicopter to fixed-wing"]
3592    MAV_VTOL_STATE_TRANSITION_TO_FW = 1,
3593    #[doc = "VTOL is in transition from fixed-wing to multicopter"]
3594    MAV_VTOL_STATE_TRANSITION_TO_MC = 2,
3595    #[doc = "VTOL is in multicopter state"]
3596    MAV_VTOL_STATE_MC = 3,
3597    #[doc = "VTOL is in fixed-wing state"]
3598    MAV_VTOL_STATE_FW = 4,
3599}
3600impl MavVtolState {
3601    pub const DEFAULT: Self = Self::MAV_VTOL_STATE_UNDEFINED;
3602}
3603impl Default for MavVtolState {
3604    fn default() -> Self {
3605        Self::DEFAULT
3606    }
3607}
3608bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Winch status flags used in WINCH_STATUS"] pub struct MavWinchStatusFlag : u32 { # [doc = "Winch is healthy"] const MAV_WINCH_STATUS_HEALTHY = 1 ; # [doc = "Winch line is fully retracted"] const MAV_WINCH_STATUS_FULLY_RETRACTED = 2 ; # [doc = "Winch motor is moving"] const MAV_WINCH_STATUS_MOVING = 4 ; # [doc = "Winch clutch is engaged allowing motor to move freely."] const MAV_WINCH_STATUS_CLUTCH_ENGAGED = 8 ; # [doc = "Winch is locked by locking mechanism."] const MAV_WINCH_STATUS_LOCKED = 16 ; # [doc = "Winch is gravity dropping payload."] const MAV_WINCH_STATUS_DROPPING = 32 ; # [doc = "Winch is arresting payload descent."] const MAV_WINCH_STATUS_ARRESTING = 64 ; # [doc = "Winch is using torque measurements to sense the ground."] const MAV_WINCH_STATUS_GROUND_SENSE = 128 ; # [doc = "Winch is returning to the fully retracted position."] const MAV_WINCH_STATUS_RETRACTING = 256 ; # [doc = "Winch is redelivering the payload. This is a failover state if the line tension goes above a threshold during RETRACTING."] const MAV_WINCH_STATUS_REDELIVER = 512 ; # [doc = "Winch is abandoning the line and possibly payload. Winch unspools the entire calculated line length. This is a failover state from REDELIVER if the number of attempts exceeds a threshold."] const MAV_WINCH_STATUS_ABANDON_LINE = 1024 ; # [doc = "Winch is engaging the locking mechanism."] const MAV_WINCH_STATUS_LOCKING = 2048 ; # [doc = "Winch is spooling on line."] const MAV_WINCH_STATUS_LOAD_LINE = 4096 ; # [doc = "Winch is loading a payload."] const MAV_WINCH_STATUS_LOAD_PAYLOAD = 8192 ; } }
3609impl MavWinchStatusFlag {
3610    pub const DEFAULT: Self = Self::MAV_WINCH_STATUS_HEALTHY;
3611}
3612impl Default for MavWinchStatusFlag {
3613    fn default() -> Self {
3614        Self::DEFAULT
3615    }
3616}
3617#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3618#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3619#[cfg_attr(feature = "serde", serde(tag = "type"))]
3620#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3621#[repr(u32)]
3622pub enum MavlinkDataStreamType {
3623    MAVLINK_DATA_STREAM_IMG_JPEG = 0,
3624    MAVLINK_DATA_STREAM_IMG_BMP = 1,
3625    MAVLINK_DATA_STREAM_IMG_RAW8U = 2,
3626    MAVLINK_DATA_STREAM_IMG_RAW32U = 3,
3627    MAVLINK_DATA_STREAM_IMG_PGM = 4,
3628    MAVLINK_DATA_STREAM_IMG_PNG = 5,
3629}
3630impl MavlinkDataStreamType {
3631    pub const DEFAULT: Self = Self::MAVLINK_DATA_STREAM_IMG_JPEG;
3632}
3633impl Default for MavlinkDataStreamType {
3634    fn default() -> Self {
3635        Self::DEFAULT
3636    }
3637}
3638#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3639#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3640#[cfg_attr(feature = "serde", serde(tag = "type"))]
3641#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3642#[repr(u32)]
3643#[doc = "States of the mission state machine.         Note that these states are independent of whether the mission is in a mode that can execute mission items or not (is suspended).         They may not all be relevant on all vehicles."]
3644pub enum MissionState {
3645    #[doc = "The mission status reporting is not supported."]
3646    MISSION_STATE_UNKNOWN = 0,
3647    #[doc = "No mission on the vehicle."]
3648    MISSION_STATE_NO_MISSION = 1,
3649    #[doc = "Mission has not started. This is the case after a mission has uploaded but not yet started executing."]
3650    MISSION_STATE_NOT_STARTED = 2,
3651    #[doc = "Mission is active, and will execute mission items when in auto mode."]
3652    MISSION_STATE_ACTIVE = 3,
3653    #[doc = "Mission is paused when in auto mode."]
3654    MISSION_STATE_PAUSED = 4,
3655    #[doc = "Mission has executed all mission items."]
3656    MISSION_STATE_COMPLETE = 5,
3657}
3658impl MissionState {
3659    pub const DEFAULT: Self = Self::MISSION_STATE_UNKNOWN;
3660}
3661impl Default for MissionState {
3662    fn default() -> Self {
3663        Self::DEFAULT
3664    }
3665}
3666#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3667#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3668#[cfg_attr(feature = "serde", serde(tag = "type"))]
3669#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3670#[repr(u32)]
3671#[doc = "Sequence that motors are tested when using MAV_CMD_DO_MOTOR_TEST."]
3672pub enum MotorTestOrder {
3673    #[doc = "Default autopilot motor test method."]
3674    MOTOR_TEST_ORDER_DEFAULT = 0,
3675    #[doc = "Motor numbers are specified as their index in a predefined vehicle-specific sequence."]
3676    MOTOR_TEST_ORDER_SEQUENCE = 1,
3677    #[doc = "Motor numbers are specified as the output as labeled on the board."]
3678    MOTOR_TEST_ORDER_BOARD = 2,
3679}
3680impl MotorTestOrder {
3681    pub const DEFAULT: Self = Self::MOTOR_TEST_ORDER_DEFAULT;
3682}
3683impl Default for MotorTestOrder {
3684    fn default() -> Self {
3685        Self::DEFAULT
3686    }
3687}
3688#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3689#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3690#[cfg_attr(feature = "serde", serde(tag = "type"))]
3691#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3692#[repr(u32)]
3693#[doc = "Defines how throttle value is represented in MAV_CMD_DO_MOTOR_TEST."]
3694pub enum MotorTestThrottleType {
3695    #[doc = "Throttle as a percentage (0 ~ 100)"]
3696    MOTOR_TEST_THROTTLE_PERCENT = 0,
3697    #[doc = "Throttle as an absolute PWM value (normally in range of 1000~2000)."]
3698    MOTOR_TEST_THROTTLE_PWM = 1,
3699    #[doc = "Throttle pass-through from pilot's transmitter."]
3700    MOTOR_TEST_THROTTLE_PILOT = 2,
3701    #[doc = "Per-motor compass calibration test."]
3702    MOTOR_TEST_COMPASS_CAL = 3,
3703}
3704impl MotorTestThrottleType {
3705    pub const DEFAULT: Self = Self::MOTOR_TEST_THROTTLE_PERCENT;
3706}
3707impl Default for MotorTestThrottleType {
3708    fn default() -> Self {
3709        Self::DEFAULT
3710    }
3711}
3712#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3713#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3714#[cfg_attr(feature = "serde", serde(tag = "type"))]
3715#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3716#[repr(u32)]
3717pub enum NavVtolLandOptions {
3718    #[doc = "Default autopilot landing behaviour."]
3719    NAV_VTOL_LAND_OPTIONS_DEFAULT = 0,
3720    #[doc = "Descend in fixed wing mode, transitioning to multicopter mode for vertical landing when close to the ground.           The fixed wing descent pattern is at the discretion of the vehicle (e.g. transition altitude, loiter direction, radius, and speed, etc.)."]
3721    NAV_VTOL_LAND_OPTIONS_FW_DESCENT = 1,
3722    #[doc = "Land in multicopter mode on reaching the landing coordinates (the whole landing is by \"hover descent\")."]
3723    NAV_VTOL_LAND_OPTIONS_HOVER_DESCENT = 2,
3724}
3725impl NavVtolLandOptions {
3726    pub const DEFAULT: Self = Self::NAV_VTOL_LAND_OPTIONS_DEFAULT;
3727}
3728impl Default for NavVtolLandOptions {
3729    fn default() -> Self {
3730        Self::DEFAULT
3731    }
3732}
3733#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3734#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3735#[cfg_attr(feature = "serde", serde(tag = "type"))]
3736#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3737#[repr(u32)]
3738#[doc = "Yaw behaviour during orbit flight."]
3739pub enum OrbitYawBehaviour {
3740    #[doc = "Vehicle front points to the center (default)."]
3741    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER = 0,
3742    #[doc = "Vehicle front holds heading when message received."]
3743    ORBIT_YAW_BEHAVIOUR_HOLD_INITIAL_HEADING = 1,
3744    #[doc = "Yaw uncontrolled."]
3745    ORBIT_YAW_BEHAVIOUR_UNCONTROLLED = 2,
3746    #[doc = "Vehicle front follows flight path (tangential to circle)."]
3747    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TANGENT_TO_CIRCLE = 3,
3748    #[doc = "Yaw controlled by RC input."]
3749    ORBIT_YAW_BEHAVIOUR_RC_CONTROLLED = 4,
3750    #[doc = "Vehicle uses current yaw behaviour (unchanged). The vehicle-default yaw behaviour is used if this value is specified when orbit is first commanded."]
3751    ORBIT_YAW_BEHAVIOUR_UNCHANGED = 5,
3752}
3753impl OrbitYawBehaviour {
3754    pub const DEFAULT: Self = Self::ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER;
3755}
3756impl Default for OrbitYawBehaviour {
3757    fn default() -> Self {
3758        Self::DEFAULT
3759    }
3760}
3761#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3762#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3763#[cfg_attr(feature = "serde", serde(tag = "type"))]
3764#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3765#[repr(u32)]
3766#[doc = "Parachute actions. Trigger release and enable/disable auto-release."]
3767pub enum ParachuteAction {
3768    #[doc = "Disable auto-release of parachute (i.e. release triggered by crash detectors)."]
3769    PARACHUTE_DISABLE = 0,
3770    #[doc = "Enable auto-release of parachute."]
3771    PARACHUTE_ENABLE = 1,
3772    #[doc = "Release parachute and kill motors."]
3773    PARACHUTE_RELEASE = 2,
3774}
3775impl ParachuteAction {
3776    pub const DEFAULT: Self = Self::PARACHUTE_DISABLE;
3777}
3778impl Default for ParachuteAction {
3779    fn default() -> Self {
3780        Self::DEFAULT
3781    }
3782}
3783#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3784#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3785#[cfg_attr(feature = "serde", serde(tag = "type"))]
3786#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3787#[repr(u32)]
3788#[doc = "Result from PARAM_EXT_SET message."]
3789pub enum ParamAck {
3790    #[doc = "Parameter value ACCEPTED and SET"]
3791    PARAM_ACK_ACCEPTED = 0,
3792    #[doc = "Parameter value UNKNOWN/UNSUPPORTED"]
3793    PARAM_ACK_VALUE_UNSUPPORTED = 1,
3794    #[doc = "Parameter failed to set"]
3795    PARAM_ACK_FAILED = 2,
3796    #[doc = "Parameter value received but not yet set/accepted. A subsequent PARAM_EXT_ACK with the final result will follow once operation is completed. This is returned immediately for parameters that take longer to set, indicating that the the parameter was received and does not need to be resent."]
3797    PARAM_ACK_IN_PROGRESS = 3,
3798}
3799impl ParamAck {
3800    pub const DEFAULT: Self = Self::PARAM_ACK_ACCEPTED;
3801}
3802impl Default for ParamAck {
3803    fn default() -> Self {
3804        Self::DEFAULT
3805    }
3806}
3807bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 9 is set the floats afx afy afz should be interpreted as force instead of acceleration."] pub struct PositionTargetTypemask : u16 { # [doc = "Ignore position x"] const POSITION_TARGET_TYPEMASK_X_IGNORE = 1 ; # [doc = "Ignore position y"] const POSITION_TARGET_TYPEMASK_Y_IGNORE = 2 ; # [doc = "Ignore position z"] const POSITION_TARGET_TYPEMASK_Z_IGNORE = 4 ; # [doc = "Ignore velocity x"] const POSITION_TARGET_TYPEMASK_VX_IGNORE = 8 ; # [doc = "Ignore velocity y"] const POSITION_TARGET_TYPEMASK_VY_IGNORE = 16 ; # [doc = "Ignore velocity z"] const POSITION_TARGET_TYPEMASK_VZ_IGNORE = 32 ; # [doc = "Ignore acceleration x"] const POSITION_TARGET_TYPEMASK_AX_IGNORE = 64 ; # [doc = "Ignore acceleration y"] const POSITION_TARGET_TYPEMASK_AY_IGNORE = 128 ; # [doc = "Ignore acceleration z"] const POSITION_TARGET_TYPEMASK_AZ_IGNORE = 256 ; # [doc = "Use force instead of acceleration"] const POSITION_TARGET_TYPEMASK_FORCE_SET = 512 ; # [doc = "Ignore yaw"] const POSITION_TARGET_TYPEMASK_YAW_IGNORE = 1024 ; # [doc = "Ignore yaw rate"] const POSITION_TARGET_TYPEMASK_YAW_RATE_IGNORE = 2048 ; } }
3808impl PositionTargetTypemask {
3809    pub const DEFAULT: Self = Self::POSITION_TARGET_TYPEMASK_X_IGNORE;
3810}
3811impl Default for PositionTargetTypemask {
3812    fn default() -> Self {
3813        Self::DEFAULT
3814    }
3815}
3816#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3817#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3818#[cfg_attr(feature = "serde", serde(tag = "type"))]
3819#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3820#[repr(u32)]
3821#[doc = "Precision land modes (used in MAV_CMD_NAV_LAND)."]
3822pub enum PrecisionLandMode {
3823    #[doc = "Normal (non-precision) landing."]
3824    PRECISION_LAND_MODE_DISABLED = 0,
3825    #[doc = "Use precision landing if beacon detected when land command accepted, otherwise land normally."]
3826    PRECISION_LAND_MODE_OPPORTUNISTIC = 1,
3827    #[doc = "Use precision landing, searching for beacon if not found when land command accepted (land normally if beacon cannot be found)."]
3828    PRECISION_LAND_MODE_REQUIRED = 2,
3829}
3830impl PrecisionLandMode {
3831    pub const DEFAULT: Self = Self::PRECISION_LAND_MODE_DISABLED;
3832}
3833impl Default for PrecisionLandMode {
3834    fn default() -> Self {
3835        Self::DEFAULT
3836    }
3837}
3838#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3839#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3840#[cfg_attr(feature = "serde", serde(tag = "type"))]
3841#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3842#[repr(u32)]
3843#[doc = "Actions for reading and writing plan information (mission, rally points, geofence) between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly missions are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
3844pub enum PreflightStorageMissionAction {
3845    #[doc = "Read current mission data from persistent storage"]
3846    MISSION_READ_PERSISTENT = 0,
3847    #[doc = "Write current mission data to persistent storage"]
3848    MISSION_WRITE_PERSISTENT = 1,
3849    #[doc = "Erase all mission data stored on the vehicle (both persistent and volatile storage)"]
3850    MISSION_RESET_DEFAULT = 2,
3851}
3852impl PreflightStorageMissionAction {
3853    pub const DEFAULT: Self = Self::MISSION_READ_PERSISTENT;
3854}
3855impl Default for PreflightStorageMissionAction {
3856    fn default() -> Self {
3857        Self::DEFAULT
3858    }
3859}
3860#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3861#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3862#[cfg_attr(feature = "serde", serde(tag = "type"))]
3863#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3864#[repr(u32)]
3865#[doc = "Actions for reading/writing parameters between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly parameters are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
3866pub enum PreflightStorageParameterAction {
3867    #[doc = "Read all parameters from persistent storage. Replaces values in volatile storage."]
3868    PARAM_READ_PERSISTENT = 0,
3869    #[doc = "Write all parameter values to persistent storage (flash/EEPROM)"]
3870    PARAM_WRITE_PERSISTENT = 1,
3871    #[doc = "Reset all user configurable parameters to their default value (including airframe selection, sensor calibration data, safety settings, and so on). Does not reset values that contain operation counters and vehicle computed statistics."]
3872    PARAM_RESET_CONFIG_DEFAULT = 2,
3873    #[doc = "Reset only sensor calibration parameters to factory defaults (or firmware default if not available)"]
3874    PARAM_RESET_SENSOR_DEFAULT = 3,
3875    #[doc = "Reset all parameters, including operation counters, to default values"]
3876    PARAM_RESET_ALL_DEFAULT = 4,
3877}
3878impl PreflightStorageParameterAction {
3879    pub const DEFAULT: Self = Self::PARAM_READ_PERSISTENT;
3880}
3881impl Default for PreflightStorageParameterAction {
3882    fn default() -> Self {
3883        Self::DEFAULT
3884    }
3885}
3886#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3887#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3888#[cfg_attr(feature = "serde", serde(tag = "type"))]
3889#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3890#[repr(u32)]
3891#[doc = "RC sub-type of types defined in RC_TYPE. Used in MAV_CMD_START_RX_PAIR. Ignored if value does not correspond to the set RC_TYPE."]
3892pub enum RcSubType {
3893    #[doc = "Spektrum DSM2"]
3894    RC_SUB_TYPE_SPEKTRUM_DSM2 = 0,
3895    #[doc = "Spektrum DSMX"]
3896    RC_SUB_TYPE_SPEKTRUM_DSMX = 1,
3897    #[doc = "Spektrum DSMX8"]
3898    RC_SUB_TYPE_SPEKTRUM_DSMX8 = 2,
3899}
3900impl RcSubType {
3901    pub const DEFAULT: Self = Self::RC_SUB_TYPE_SPEKTRUM_DSM2;
3902}
3903impl Default for RcSubType {
3904    fn default() -> Self {
3905        Self::DEFAULT
3906    }
3907}
3908#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3909#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3910#[cfg_attr(feature = "serde", serde(tag = "type"))]
3911#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3912#[repr(u32)]
3913#[doc = "RC type. Used in MAV_CMD_START_RX_PAIR."]
3914pub enum RcType {
3915    #[doc = "Spektrum"]
3916    RC_TYPE_SPEKTRUM = 0,
3917    #[doc = "CRSF"]
3918    RC_TYPE_CRSF = 1,
3919}
3920impl RcType {
3921    pub const DEFAULT: Self = Self::RC_TYPE_SPEKTRUM;
3922}
3923impl Default for RcType {
3924    fn default() -> Self {
3925        Self::DEFAULT
3926    }
3927}
3928#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3929#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3930#[cfg_attr(feature = "serde", serde(tag = "type"))]
3931#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3932#[repr(u32)]
3933#[doc = "Specifies the conditions under which the MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN command should be accepted."]
3934pub enum RebootShutdownConditions {
3935    #[doc = "Reboot/Shutdown only if allowed by safety checks, such as being landed."]
3936    REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED = 0,
3937    #[doc = "Force reboot/shutdown of the autopilot/component regardless of system state."]
3938    REBOOT_SHUTDOWN_CONDITIONS_FORCE = 20190226,
3939}
3940impl RebootShutdownConditions {
3941    pub const DEFAULT: Self = Self::REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED;
3942}
3943impl Default for RebootShutdownConditions {
3944    fn default() -> Self {
3945        Self::DEFAULT
3946    }
3947}
3948#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3949#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3950#[cfg_attr(feature = "serde", serde(tag = "type"))]
3951#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3952#[repr(u32)]
3953#[doc = "RTK GPS baseline coordinate system, used for RTK corrections"]
3954pub enum RtkBaselineCoordinateSystem {
3955    #[doc = "Earth-centered, Earth-fixed"]
3956    RTK_BASELINE_COORDINATE_SYSTEM_ECEF = 0,
3957    #[doc = "RTK basestation centered, north, east, down"]
3958    RTK_BASELINE_COORDINATE_SYSTEM_NED = 1,
3959}
3960impl RtkBaselineCoordinateSystem {
3961    pub const DEFAULT: Self = Self::RTK_BASELINE_COORDINATE_SYSTEM_ECEF;
3962}
3963impl Default for RtkBaselineCoordinateSystem {
3964    fn default() -> Self {
3965        Self::DEFAULT
3966    }
3967}
3968#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3969#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3970#[cfg_attr(feature = "serde", serde(tag = "type"))]
3971#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3972#[repr(u32)]
3973#[doc = "Possible safety switch states."]
3974pub enum SafetySwitchState {
3975    #[doc = "Safety switch is engaged and vehicle should be safe to approach."]
3976    SAFETY_SWITCH_STATE_SAFE = 0,
3977    #[doc = "Safety switch is NOT engaged and motors, propellers and other actuators should be considered active."]
3978    SAFETY_SWITCH_STATE_DANGEROUS = 1,
3979}
3980impl SafetySwitchState {
3981    pub const DEFAULT: Self = Self::SAFETY_SWITCH_STATE_SAFE;
3982}
3983impl Default for SafetySwitchState {
3984    fn default() -> Self {
3985        Self::DEFAULT
3986    }
3987}
3988#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3989#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3990#[cfg_attr(feature = "serde", serde(tag = "type"))]
3991#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3992#[repr(u32)]
3993#[doc = "SERIAL_CONTROL device types"]
3994pub enum SerialControlDev {
3995    #[doc = "First telemetry port"]
3996    SERIAL_CONTROL_DEV_TELEM1 = 0,
3997    #[doc = "Second telemetry port"]
3998    SERIAL_CONTROL_DEV_TELEM2 = 1,
3999    #[doc = "First GPS port"]
4000    SERIAL_CONTROL_DEV_GPS1 = 2,
4001    #[doc = "Second GPS port"]
4002    SERIAL_CONTROL_DEV_GPS2 = 3,
4003    #[doc = "system shell"]
4004    SERIAL_CONTROL_DEV_SHELL = 10,
4005    #[doc = "SERIAL0"]
4006    SERIAL_CONTROL_SERIAL0 = 100,
4007    #[doc = "SERIAL1"]
4008    SERIAL_CONTROL_SERIAL1 = 101,
4009    #[doc = "SERIAL2"]
4010    SERIAL_CONTROL_SERIAL2 = 102,
4011    #[doc = "SERIAL3"]
4012    SERIAL_CONTROL_SERIAL3 = 103,
4013    #[doc = "SERIAL4"]
4014    SERIAL_CONTROL_SERIAL4 = 104,
4015    #[doc = "SERIAL5"]
4016    SERIAL_CONTROL_SERIAL5 = 105,
4017    #[doc = "SERIAL6"]
4018    SERIAL_CONTROL_SERIAL6 = 106,
4019    #[doc = "SERIAL7"]
4020    SERIAL_CONTROL_SERIAL7 = 107,
4021    #[doc = "SERIAL8"]
4022    SERIAL_CONTROL_SERIAL8 = 108,
4023    #[doc = "SERIAL9"]
4024    SERIAL_CONTROL_SERIAL9 = 109,
4025}
4026impl SerialControlDev {
4027    pub const DEFAULT: Self = Self::SERIAL_CONTROL_DEV_TELEM1;
4028}
4029impl Default for SerialControlDev {
4030    fn default() -> Self {
4031        Self::DEFAULT
4032    }
4033}
4034bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "SERIAL_CONTROL flags (bitmask)"] pub struct SerialControlFlag : u8 { # [doc = "Set if this is a reply"] const SERIAL_CONTROL_FLAG_REPLY = 1 ; # [doc = "Set if the sender wants the receiver to send a response as another SERIAL_CONTROL message"] const SERIAL_CONTROL_FLAG_RESPOND = 2 ; # [doc = "Set if access to the serial port should be removed from whatever driver is currently using it, giving exclusive access to the SERIAL_CONTROL protocol. The port can be handed back by sending a request without this flag set"] const SERIAL_CONTROL_FLAG_EXCLUSIVE = 4 ; # [doc = "Block on writes to the serial port"] const SERIAL_CONTROL_FLAG_BLOCKING = 8 ; # [doc = "Send multiple replies until port is drained"] const SERIAL_CONTROL_FLAG_MULTI = 16 ; } }
4035impl SerialControlFlag {
4036    pub const DEFAULT: Self = Self::SERIAL_CONTROL_FLAG_REPLY;
4037}
4038impl Default for SerialControlFlag {
4039    fn default() -> Self {
4040        Self::DEFAULT
4041    }
4042}
4043#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4044#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4045#[cfg_attr(feature = "serde", serde(tag = "type"))]
4046#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4047#[repr(u32)]
4048#[doc = "Focus types for MAV_CMD_SET_CAMERA_FOCUS"]
4049pub enum SetFocusType {
4050    #[doc = "Focus one step increment (-1 for focusing in, 1 for focusing out towards infinity)."]
4051    FOCUS_TYPE_STEP = 0,
4052    #[doc = "Continuous normalized focus in/out rate until stopped. Range -1..1, negative: in, positive: out towards infinity, 0 to stop focusing. Other values should be clipped to the range."]
4053    FOCUS_TYPE_CONTINUOUS = 1,
4054    #[doc = "Focus value as proportion of full camera focus range (a value between 0.0 and 100.0)"]
4055    FOCUS_TYPE_RANGE = 2,
4056    #[doc = "Focus value in metres. Note that there is no message to get the valid focus range of the camera, so this can type can only be used for cameras where the range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)."]
4057    FOCUS_TYPE_METERS = 3,
4058    #[doc = "Focus automatically."]
4059    FOCUS_TYPE_AUTO = 4,
4060    #[doc = "Single auto focus. Mainly used for still pictures. Usually abbreviated as AF-S."]
4061    FOCUS_TYPE_AUTO_SINGLE = 5,
4062    #[doc = "Continuous auto focus. Mainly used for dynamic scenes. Abbreviated as AF-C."]
4063    FOCUS_TYPE_AUTO_CONTINUOUS = 6,
4064}
4065impl SetFocusType {
4066    pub const DEFAULT: Self = Self::FOCUS_TYPE_STEP;
4067}
4068impl Default for SetFocusType {
4069    fn default() -> Self {
4070        Self::DEFAULT
4071    }
4072}
4073#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4074#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4075#[cfg_attr(feature = "serde", serde(tag = "type"))]
4076#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4077#[repr(u32)]
4078#[doc = "Speed setpoint types used in MAV_CMD_DO_CHANGE_SPEED"]
4079pub enum SpeedType {
4080    #[doc = "Airspeed"]
4081    SPEED_TYPE_AIRSPEED = 0,
4082    #[doc = "Groundspeed"]
4083    SPEED_TYPE_GROUNDSPEED = 1,
4084    #[doc = "Climb speed"]
4085    SPEED_TYPE_CLIMB_SPEED = 2,
4086    #[doc = "Descent speed"]
4087    SPEED_TYPE_DESCENT_SPEED = 3,
4088}
4089impl SpeedType {
4090    pub const DEFAULT: Self = Self::SPEED_TYPE_AIRSPEED;
4091}
4092impl Default for SpeedType {
4093    fn default() -> Self {
4094        Self::DEFAULT
4095    }
4096}
4097#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4098#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4099#[cfg_attr(feature = "serde", serde(tag = "type"))]
4100#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4101#[repr(u32)]
4102#[doc = "Flags to indicate the status of camera storage."]
4103pub enum StorageStatus {
4104    #[doc = "Storage is missing (no microSD card loaded for example.)"]
4105    STORAGE_STATUS_EMPTY = 0,
4106    #[doc = "Storage present but unformatted."]
4107    STORAGE_STATUS_UNFORMATTED = 1,
4108    #[doc = "Storage present and ready."]
4109    STORAGE_STATUS_READY = 2,
4110    #[doc = "Camera does not supply storage status information. Capacity information in STORAGE_INFORMATION fields will be ignored."]
4111    STORAGE_STATUS_NOT_SUPPORTED = 3,
4112}
4113impl StorageStatus {
4114    pub const DEFAULT: Self = Self::STORAGE_STATUS_EMPTY;
4115}
4116impl Default for StorageStatus {
4117    fn default() -> Self {
4118        Self::DEFAULT
4119    }
4120}
4121#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4122#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4123#[cfg_attr(feature = "serde", serde(tag = "type"))]
4124#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4125#[repr(u32)]
4126#[doc = "Flags to indicate the type of storage."]
4127pub enum StorageType {
4128    #[doc = "Storage type is not known."]
4129    STORAGE_TYPE_UNKNOWN = 0,
4130    #[doc = "Storage type is USB device."]
4131    STORAGE_TYPE_USB_STICK = 1,
4132    #[doc = "Storage type is SD card."]
4133    STORAGE_TYPE_SD = 2,
4134    #[doc = "Storage type is microSD card."]
4135    STORAGE_TYPE_MICROSD = 3,
4136    #[doc = "Storage type is CFast."]
4137    STORAGE_TYPE_CF = 4,
4138    #[doc = "Storage type is CFexpress."]
4139    STORAGE_TYPE_CFE = 5,
4140    #[doc = "Storage type is XQD."]
4141    STORAGE_TYPE_XQD = 6,
4142    #[doc = "Storage type is HD mass storage type."]
4143    STORAGE_TYPE_HD = 7,
4144    #[doc = "Storage type is other, not listed type."]
4145    STORAGE_TYPE_OTHER = 254,
4146}
4147impl StorageType {
4148    pub const DEFAULT: Self = Self::STORAGE_TYPE_UNKNOWN;
4149}
4150impl Default for StorageType {
4151    fn default() -> Self {
4152        Self::DEFAULT
4153    }
4154}
4155bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to indicate usage for a particular storage (see STORAGE_INFORMATION.storage_usage and MAV_CMD_SET_STORAGE_USAGE)."] pub struct StorageUsageFlag : u8 { # [doc = "Always set to 1 (indicates STORAGE_INFORMATION.storage_usage is supported)."] const STORAGE_USAGE_FLAG_SET = 1 ; # [doc = "Storage for saving photos."] const STORAGE_USAGE_FLAG_PHOTO = 2 ; # [doc = "Storage for saving videos."] const STORAGE_USAGE_FLAG_VIDEO = 4 ; # [doc = "Storage for saving logs."] const STORAGE_USAGE_FLAG_LOGS = 8 ; } }
4156impl StorageUsageFlag {
4157    pub const DEFAULT: Self = Self::STORAGE_USAGE_FLAG_SET;
4158}
4159impl Default for StorageUsageFlag {
4160    fn default() -> Self {
4161        Self::DEFAULT
4162    }
4163}
4164#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4165#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4166#[cfg_attr(feature = "serde", serde(tag = "type"))]
4167#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4168#[repr(u32)]
4169#[doc = "Tune formats (used for vehicle buzzer/tone generation)."]
4170pub enum TuneFormat {
4171    #[doc = "Format is QBasic 1.1 Play: <https://www.qbasic.net/en/reference/qb11/Statement/PLAY-006.htm>."]
4172    TUNE_FORMAT_QBASIC1_1 = 1,
4173    #[doc = "Format is Modern Music Markup Language (MML): <https://en.wikipedia.org/wiki/Music_Macro_Language#Modern_MML>."]
4174    TUNE_FORMAT_MML_MODERN = 2,
4175}
4176impl TuneFormat {
4177    pub const DEFAULT: Self = Self::TUNE_FORMAT_QBASIC1_1;
4178}
4179impl Default for TuneFormat {
4180    fn default() -> Self {
4181        Self::DEFAULT
4182    }
4183}
4184#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4185#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4186#[cfg_attr(feature = "serde", serde(tag = "type"))]
4187#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4188#[repr(u32)]
4189#[doc = "Available autopilot modes for ualberta uav"]
4190pub enum UalbertaAutopilotMode {
4191    #[doc = "Raw input pulse widts sent to output"]
4192    MODE_MANUAL_DIRECT = 1,
4193    #[doc = "Inputs are normalized using calibration, the converted back to raw pulse widths for output"]
4194    MODE_MANUAL_SCALED = 2,
4195    MODE_AUTO_PID_ATT = 3,
4196    MODE_AUTO_PID_VEL = 4,
4197    MODE_AUTO_PID_POS = 5,
4198}
4199impl UalbertaAutopilotMode {
4200    pub const DEFAULT: Self = Self::MODE_MANUAL_DIRECT;
4201}
4202impl Default for UalbertaAutopilotMode {
4203    fn default() -> Self {
4204        Self::DEFAULT
4205    }
4206}
4207#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4208#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4209#[cfg_attr(feature = "serde", serde(tag = "type"))]
4210#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4211#[repr(u32)]
4212#[doc = "Navigation filter mode"]
4213pub enum UalbertaNavMode {
4214    NAV_AHRS_INIT = 1,
4215    #[doc = "AHRS mode"]
4216    NAV_AHRS = 2,
4217    #[doc = "INS/GPS initialization mode"]
4218    NAV_INS_GPS_INIT = 3,
4219    #[doc = "INS/GPS mode"]
4220    NAV_INS_GPS = 4,
4221}
4222impl UalbertaNavMode {
4223    pub const DEFAULT: Self = Self::NAV_AHRS_INIT;
4224}
4225impl Default for UalbertaNavMode {
4226    fn default() -> Self {
4227        Self::DEFAULT
4228    }
4229}
4230#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4231#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4232#[cfg_attr(feature = "serde", serde(tag = "type"))]
4233#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4234#[repr(u32)]
4235#[doc = "Mode currently commanded by pilot"]
4236pub enum UalbertaPilotMode {
4237    PILOT_MANUAL = 1,
4238    PILOT_AUTO = 2,
4239    #[doc = "Rotomotion mode"]
4240    PILOT_ROTO = 3,
4241}
4242impl UalbertaPilotMode {
4243    pub const DEFAULT: Self = Self::PILOT_MANUAL;
4244}
4245impl Default for UalbertaPilotMode {
4246    fn default() -> Self {
4247        Self::DEFAULT
4248    }
4249}
4250#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4251#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4252#[cfg_attr(feature = "serde", serde(tag = "type"))]
4253#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4254#[repr(u32)]
4255#[doc = "Generalized UAVCAN node health"]
4256pub enum UavcanNodeHealth {
4257    #[doc = "The node is functioning properly."]
4258    UAVCAN_NODE_HEALTH_OK = 0,
4259    #[doc = "A critical parameter went out of range or the node has encountered a minor failure."]
4260    UAVCAN_NODE_HEALTH_WARNING = 1,
4261    #[doc = "The node has encountered a major failure."]
4262    UAVCAN_NODE_HEALTH_ERROR = 2,
4263    #[doc = "The node has suffered a fatal malfunction."]
4264    UAVCAN_NODE_HEALTH_CRITICAL = 3,
4265}
4266impl UavcanNodeHealth {
4267    pub const DEFAULT: Self = Self::UAVCAN_NODE_HEALTH_OK;
4268}
4269impl Default for UavcanNodeHealth {
4270    fn default() -> Self {
4271        Self::DEFAULT
4272    }
4273}
4274#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4275#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4276#[cfg_attr(feature = "serde", serde(tag = "type"))]
4277#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4278#[repr(u32)]
4279#[doc = "Generalized UAVCAN node mode"]
4280pub enum UavcanNodeMode {
4281    #[doc = "The node is performing its primary functions."]
4282    UAVCAN_NODE_MODE_OPERATIONAL = 0,
4283    #[doc = "The node is initializing; this mode is entered immediately after startup."]
4284    UAVCAN_NODE_MODE_INITIALIZATION = 1,
4285    #[doc = "The node is under maintenance."]
4286    UAVCAN_NODE_MODE_MAINTENANCE = 2,
4287    #[doc = "The node is in the process of updating its software."]
4288    UAVCAN_NODE_MODE_SOFTWARE_UPDATE = 3,
4289    #[doc = "The node is no longer available online."]
4290    UAVCAN_NODE_MODE_OFFLINE = 7,
4291}
4292impl UavcanNodeMode {
4293    pub const DEFAULT: Self = Self::UAVCAN_NODE_MODE_OPERATIONAL;
4294}
4295impl Default for UavcanNodeMode {
4296    fn default() -> Self {
4297        Self::DEFAULT
4298    }
4299}
4300bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for the global position report."] pub struct UtmDataAvailFlags : u8 { # [doc = "The field time contains valid data."] const UTM_DATA_AVAIL_FLAGS_TIME_VALID = 1 ; # [doc = "The field uas_id contains valid data."] const UTM_DATA_AVAIL_FLAGS_UAS_ID_AVAILABLE = 2 ; # [doc = "The fields lat, lon and h_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_POSITION_AVAILABLE = 4 ; # [doc = "The fields alt and v_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_ALTITUDE_AVAILABLE = 8 ; # [doc = "The field relative_alt contains valid data."] const UTM_DATA_AVAIL_FLAGS_RELATIVE_ALTITUDE_AVAILABLE = 16 ; # [doc = "The fields vx and vy contain valid data."] const UTM_DATA_AVAIL_FLAGS_HORIZONTAL_VELO_AVAILABLE = 32 ; # [doc = "The field vz contains valid data."] const UTM_DATA_AVAIL_FLAGS_VERTICAL_VELO_AVAILABLE = 64 ; # [doc = "The fields next_lat, next_lon and next_alt contain valid data."] const UTM_DATA_AVAIL_FLAGS_NEXT_WAYPOINT_AVAILABLE = 128 ; } }
4301impl UtmDataAvailFlags {
4302    pub const DEFAULT: Self = Self::UTM_DATA_AVAIL_FLAGS_TIME_VALID;
4303}
4304impl Default for UtmDataAvailFlags {
4305    fn default() -> Self {
4306        Self::DEFAULT
4307    }
4308}
4309#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4310#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4311#[cfg_attr(feature = "serde", serde(tag = "type"))]
4312#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4313#[repr(u32)]
4314#[doc = "Airborne status of UAS."]
4315pub enum UtmFlightState {
4316    #[doc = "The flight state can't be determined."]
4317    UTM_FLIGHT_STATE_UNKNOWN = 1,
4318    #[doc = "UAS on ground."]
4319    UTM_FLIGHT_STATE_GROUND = 2,
4320    #[doc = "UAS airborne."]
4321    UTM_FLIGHT_STATE_AIRBORNE = 3,
4322    #[doc = "UAS is in an emergency flight state."]
4323    UTM_FLIGHT_STATE_EMERGENCY = 16,
4324    #[doc = "UAS has no active controls."]
4325    UTM_FLIGHT_STATE_NOCTRL = 32,
4326}
4327impl UtmFlightState {
4328    pub const DEFAULT: Self = Self::UTM_FLIGHT_STATE_UNKNOWN;
4329}
4330impl Default for UtmFlightState {
4331    fn default() -> Self {
4332        Self::DEFAULT
4333    }
4334}
4335#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4336#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4337#[cfg_attr(feature = "serde", serde(tag = "type"))]
4338#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4339#[repr(u32)]
4340#[doc = "Video stream encodings"]
4341pub enum VideoStreamEncoding {
4342    #[doc = "Stream encoding is unknown"]
4343    VIDEO_STREAM_ENCODING_UNKNOWN = 0,
4344    #[doc = "Stream encoding is H.264"]
4345    VIDEO_STREAM_ENCODING_H264 = 1,
4346    #[doc = "Stream encoding is H.265"]
4347    VIDEO_STREAM_ENCODING_H265 = 2,
4348}
4349impl VideoStreamEncoding {
4350    pub const DEFAULT: Self = Self::VIDEO_STREAM_ENCODING_UNKNOWN;
4351}
4352impl Default for VideoStreamEncoding {
4353    fn default() -> Self {
4354        Self::DEFAULT
4355    }
4356}
4357bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Stream status flags (Bitmap)"] pub struct VideoStreamStatusFlags : u16 { # [doc = "Stream is active (running)"] const VIDEO_STREAM_STATUS_FLAGS_RUNNING = 1 ; # [doc = "Stream is thermal imaging"] const VIDEO_STREAM_STATUS_FLAGS_THERMAL = 2 ; # [doc = "Stream can report absolute thermal range (see CAMERA_THERMAL_RANGE)."] const VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED = 4 ; } }
4358impl VideoStreamStatusFlags {
4359    pub const DEFAULT: Self = Self::VIDEO_STREAM_STATUS_FLAGS_RUNNING;
4360}
4361impl Default for VideoStreamStatusFlags {
4362    fn default() -> Self {
4363        Self::DEFAULT
4364    }
4365}
4366#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4367#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4368#[cfg_attr(feature = "serde", serde(tag = "type"))]
4369#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4370#[repr(u32)]
4371#[doc = "Video stream types"]
4372pub enum VideoStreamType {
4373    #[doc = "Stream is RTSP"]
4374    VIDEO_STREAM_TYPE_RTSP = 0,
4375    #[doc = "Stream is RTP UDP (URI gives the port number)"]
4376    VIDEO_STREAM_TYPE_RTPUDP = 1,
4377    #[doc = "Stream is MPEG on TCP"]
4378    VIDEO_STREAM_TYPE_TCP_MPEG = 2,
4379    #[doc = "Stream is MPEG TS (URI gives the port number)"]
4380    VIDEO_STREAM_TYPE_MPEG_TS = 3,
4381}
4382impl VideoStreamType {
4383    pub const DEFAULT: Self = Self::VIDEO_STREAM_TYPE_RTSP;
4384}
4385impl Default for VideoStreamType {
4386    fn default() -> Self {
4387        Self::DEFAULT
4388    }
4389}
4390#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4391#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4392#[cfg_attr(feature = "serde", serde(tag = "type"))]
4393#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4394#[repr(u32)]
4395#[doc = "Direction of VTOL transition"]
4396pub enum VtolTransitionHeading {
4397    #[doc = "Respect the heading configuration of the vehicle."]
4398    VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT = 0,
4399    #[doc = "Use the heading pointing towards the next waypoint."]
4400    VTOL_TRANSITION_HEADING_NEXT_WAYPOINT = 1,
4401    #[doc = "Use the heading on takeoff (while sitting on the ground)."]
4402    VTOL_TRANSITION_HEADING_TAKEOFF = 2,
4403    #[doc = "Use the specified heading in parameter 4."]
4404    VTOL_TRANSITION_HEADING_SPECIFIED = 3,
4405    #[doc = "Use the current heading when reaching takeoff altitude (potentially facing the wind when weather-vaning is active)."]
4406    VTOL_TRANSITION_HEADING_ANY = 4,
4407}
4408impl VtolTransitionHeading {
4409    pub const DEFAULT: Self = Self::VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT;
4410}
4411impl Default for VtolTransitionHeading {
4412    fn default() -> Self {
4413        Self::DEFAULT
4414    }
4415}
4416#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4417#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4418#[cfg_attr(feature = "serde", serde(tag = "type"))]
4419#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4420#[repr(u32)]
4421#[doc = "WiFi Mode."]
4422pub enum WifiConfigApMode {
4423    #[doc = "WiFi mode is undefined."]
4424    WIFI_CONFIG_AP_MODE_UNDEFINED = 0,
4425    #[doc = "WiFi configured as an access point."]
4426    WIFI_CONFIG_AP_MODE_AP = 1,
4427    #[doc = "WiFi configured as a station connected to an existing local WiFi network."]
4428    WIFI_CONFIG_AP_MODE_STATION = 2,
4429    #[doc = "WiFi disabled."]
4430    WIFI_CONFIG_AP_MODE_DISABLED = 3,
4431}
4432impl WifiConfigApMode {
4433    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_MODE_UNDEFINED;
4434}
4435impl Default for WifiConfigApMode {
4436    fn default() -> Self {
4437        Self::DEFAULT
4438    }
4439}
4440#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4441#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4442#[cfg_attr(feature = "serde", serde(tag = "type"))]
4443#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4444#[repr(u32)]
4445#[doc = "Possible responses from a WIFI_CONFIG_AP message."]
4446pub enum WifiConfigApResponse {
4447    #[doc = "Undefined response. Likely an indicative of a system that doesn't support this request."]
4448    WIFI_CONFIG_AP_RESPONSE_UNDEFINED = 0,
4449    #[doc = "Changes accepted."]
4450    WIFI_CONFIG_AP_RESPONSE_ACCEPTED = 1,
4451    #[doc = "Changes rejected."]
4452    WIFI_CONFIG_AP_RESPONSE_REJECTED = 2,
4453    #[doc = "Invalid Mode."]
4454    WIFI_CONFIG_AP_RESPONSE_MODE_ERROR = 3,
4455    #[doc = "Invalid SSID."]
4456    WIFI_CONFIG_AP_RESPONSE_SSID_ERROR = 4,
4457    #[doc = "Invalid Password."]
4458    WIFI_CONFIG_AP_RESPONSE_PASSWORD_ERROR = 5,
4459}
4460impl WifiConfigApResponse {
4461    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_RESPONSE_UNDEFINED;
4462}
4463impl Default for WifiConfigApResponse {
4464    fn default() -> Self {
4465        Self::DEFAULT
4466    }
4467}
4468#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4469#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4470#[cfg_attr(feature = "serde", serde(tag = "type"))]
4471#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4472#[repr(u32)]
4473#[doc = "Winch actions."]
4474pub enum WinchActions {
4475    #[doc = "Allow motor to freewheel."]
4476    WINCH_RELAXED = 0,
4477    #[doc = "Wind or unwind specified length of line, optionally using specified rate."]
4478    WINCH_RELATIVE_LENGTH_CONTROL = 1,
4479    #[doc = "Wind or unwind line at specified rate."]
4480    WINCH_RATE_CONTROL = 2,
4481    #[doc = "Perform the locking sequence to relieve motor while in the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4482    WINCH_LOCK = 3,
4483    #[doc = "Sequence of drop, slow down, touch down, reel up, lock. Only action and instance command parameters are used, others are ignored."]
4484    WINCH_DELIVER = 4,
4485    #[doc = "Engage motor and hold current position. Only action and instance command parameters are used, others are ignored."]
4486    WINCH_HOLD = 5,
4487    #[doc = "Return the reel to the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4488    WINCH_RETRACT = 6,
4489    #[doc = "Load the reel with line. The winch will calculate the total loaded length and stop when the tension exceeds a threshold. Only action and instance command parameters are used, others are ignored."]
4490    WINCH_LOAD_LINE = 7,
4491    #[doc = "Spool out the entire length of the line. Only action and instance command parameters are used, others are ignored."]
4492    WINCH_ABANDON_LINE = 8,
4493    #[doc = "Spools out just enough to present the hook to the user to load the payload. Only action and instance command parameters are used, others are ignored"]
4494    WINCH_LOAD_PAYLOAD = 9,
4495}
4496impl WinchActions {
4497    pub const DEFAULT: Self = Self::WINCH_RELAXED;
4498}
4499impl Default for WinchActions {
4500    fn default() -> Self {
4501        Self::DEFAULT
4502    }
4503}
4504#[doc = "id: 140"]
4505#[doc = "Set the vehicle attitude and body angular rates."]
4506#[derive(Debug, Clone, PartialEq)]
4507#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4508#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4509pub struct ACTUATOR_CONTROL_TARGET_DATA {
4510    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
4511    pub time_usec: u64,
4512    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
4513    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4514    pub controls: [f32; 8],
4515    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
4516    pub group_mlx: u8,
4517}
4518impl ACTUATOR_CONTROL_TARGET_DATA {
4519    pub const ENCODED_LEN: usize = 41usize;
4520    pub const DEFAULT: Self = Self {
4521        time_usec: 0_u64,
4522        controls: [0.0_f32; 8usize],
4523        group_mlx: 0_u8,
4524    };
4525    #[cfg(feature = "arbitrary")]
4526    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4527        use arbitrary::{Arbitrary, Unstructured};
4528        let mut buf = [0u8; 1024];
4529        rng.fill_bytes(&mut buf);
4530        let mut unstructured = Unstructured::new(&buf);
4531        Self::arbitrary(&mut unstructured).unwrap_or_default()
4532    }
4533}
4534impl Default for ACTUATOR_CONTROL_TARGET_DATA {
4535    fn default() -> Self {
4536        Self::DEFAULT.clone()
4537    }
4538}
4539impl MessageData for ACTUATOR_CONTROL_TARGET_DATA {
4540    type Message = MavMessage;
4541    const ID: u32 = 140u32;
4542    const NAME: &'static str = "ACTUATOR_CONTROL_TARGET";
4543    const EXTRA_CRC: u8 = 181u8;
4544    const ENCODED_LEN: usize = 41usize;
4545    fn deser(
4546        _version: MavlinkVersion,
4547        __input: &[u8],
4548    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4549        let avail_len = __input.len();
4550        let mut payload_buf = [0; Self::ENCODED_LEN];
4551        let mut buf = if avail_len < Self::ENCODED_LEN {
4552            payload_buf[0..avail_len].copy_from_slice(__input);
4553            Bytes::new(&payload_buf)
4554        } else {
4555            Bytes::new(__input)
4556        };
4557        let mut __struct = Self::default();
4558        __struct.time_usec = buf.get_u64_le();
4559        for v in &mut __struct.controls {
4560            let val = buf.get_f32_le();
4561            *v = val;
4562        }
4563        __struct.group_mlx = buf.get_u8();
4564        Ok(__struct)
4565    }
4566    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4567        let mut __tmp = BytesMut::new(bytes);
4568        #[allow(clippy::absurd_extreme_comparisons)]
4569        #[allow(unused_comparisons)]
4570        if __tmp.remaining() < Self::ENCODED_LEN {
4571            panic!(
4572                "buffer is too small (need {} bytes, but got {})",
4573                Self::ENCODED_LEN,
4574                __tmp.remaining(),
4575            )
4576        }
4577        __tmp.put_u64_le(self.time_usec);
4578        for val in &self.controls {
4579            __tmp.put_f32_le(*val);
4580        }
4581        __tmp.put_u8(self.group_mlx);
4582        if matches!(version, MavlinkVersion::V2) {
4583            let len = __tmp.len();
4584            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4585        } else {
4586            __tmp.len()
4587        }
4588    }
4589}
4590#[doc = "id: 375"]
4591#[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
4592#[derive(Debug, Clone, PartialEq)]
4593#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4594#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4595pub struct ACTUATOR_OUTPUT_STATUS_DATA {
4596    #[doc = "Timestamp (since system boot)."]
4597    pub time_usec: u64,
4598    #[doc = "Active outputs"]
4599    pub active: u32,
4600    #[doc = "Servo / motor output array values. Zero values indicate unused channels."]
4601    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4602    pub actuator: [f32; 32],
4603}
4604impl ACTUATOR_OUTPUT_STATUS_DATA {
4605    pub const ENCODED_LEN: usize = 140usize;
4606    pub const DEFAULT: Self = Self {
4607        time_usec: 0_u64,
4608        active: 0_u32,
4609        actuator: [0.0_f32; 32usize],
4610    };
4611    #[cfg(feature = "arbitrary")]
4612    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4613        use arbitrary::{Arbitrary, Unstructured};
4614        let mut buf = [0u8; 1024];
4615        rng.fill_bytes(&mut buf);
4616        let mut unstructured = Unstructured::new(&buf);
4617        Self::arbitrary(&mut unstructured).unwrap_or_default()
4618    }
4619}
4620impl Default for ACTUATOR_OUTPUT_STATUS_DATA {
4621    fn default() -> Self {
4622        Self::DEFAULT.clone()
4623    }
4624}
4625impl MessageData for ACTUATOR_OUTPUT_STATUS_DATA {
4626    type Message = MavMessage;
4627    const ID: u32 = 375u32;
4628    const NAME: &'static str = "ACTUATOR_OUTPUT_STATUS";
4629    const EXTRA_CRC: u8 = 251u8;
4630    const ENCODED_LEN: usize = 140usize;
4631    fn deser(
4632        _version: MavlinkVersion,
4633        __input: &[u8],
4634    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4635        let avail_len = __input.len();
4636        let mut payload_buf = [0; Self::ENCODED_LEN];
4637        let mut buf = if avail_len < Self::ENCODED_LEN {
4638            payload_buf[0..avail_len].copy_from_slice(__input);
4639            Bytes::new(&payload_buf)
4640        } else {
4641            Bytes::new(__input)
4642        };
4643        let mut __struct = Self::default();
4644        __struct.time_usec = buf.get_u64_le();
4645        __struct.active = buf.get_u32_le();
4646        for v in &mut __struct.actuator {
4647            let val = buf.get_f32_le();
4648            *v = val;
4649        }
4650        Ok(__struct)
4651    }
4652    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4653        let mut __tmp = BytesMut::new(bytes);
4654        #[allow(clippy::absurd_extreme_comparisons)]
4655        #[allow(unused_comparisons)]
4656        if __tmp.remaining() < Self::ENCODED_LEN {
4657            panic!(
4658                "buffer is too small (need {} bytes, but got {})",
4659                Self::ENCODED_LEN,
4660                __tmp.remaining(),
4661            )
4662        }
4663        __tmp.put_u64_le(self.time_usec);
4664        __tmp.put_u32_le(self.active);
4665        for val in &self.actuator {
4666            __tmp.put_f32_le(*val);
4667        }
4668        if matches!(version, MavlinkVersion::V2) {
4669            let len = __tmp.len();
4670            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4671        } else {
4672            __tmp.len()
4673        }
4674    }
4675}
4676#[doc = "id: 246"]
4677#[doc = "The location and information of an ADSB vehicle."]
4678#[derive(Debug, Clone, PartialEq)]
4679#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4680#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4681pub struct ADSB_VEHICLE_DATA {
4682    #[doc = "ICAO address"]
4683    pub ICAO_address: u32,
4684    #[doc = "Latitude"]
4685    pub lat: i32,
4686    #[doc = "Longitude"]
4687    pub lon: i32,
4688    #[doc = "Altitude(ASL)"]
4689    pub altitude: i32,
4690    #[doc = "Course over ground"]
4691    pub heading: u16,
4692    #[doc = "The horizontal velocity"]
4693    pub hor_velocity: u16,
4694    #[doc = "The vertical velocity. Positive is up"]
4695    pub ver_velocity: i16,
4696    #[doc = "Bitmap to indicate various statuses including valid data fields"]
4697    pub flags: AdsbFlags,
4698    #[doc = "Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000"]
4699    pub squawk: u16,
4700    #[doc = "ADSB altitude type."]
4701    pub altitude_type: AdsbAltitudeType,
4702    #[doc = "The callsign, 8+null"]
4703    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4704    pub callsign: [u8; 9],
4705    #[doc = "ADSB emitter type."]
4706    pub emitter_type: AdsbEmitterType,
4707    #[doc = "Time since last communication in seconds"]
4708    pub tslc: u8,
4709}
4710impl ADSB_VEHICLE_DATA {
4711    pub const ENCODED_LEN: usize = 38usize;
4712    pub const DEFAULT: Self = Self {
4713        ICAO_address: 0_u32,
4714        lat: 0_i32,
4715        lon: 0_i32,
4716        altitude: 0_i32,
4717        heading: 0_u16,
4718        hor_velocity: 0_u16,
4719        ver_velocity: 0_i16,
4720        flags: AdsbFlags::DEFAULT,
4721        squawk: 0_u16,
4722        altitude_type: AdsbAltitudeType::DEFAULT,
4723        callsign: [0_u8; 9usize],
4724        emitter_type: AdsbEmitterType::DEFAULT,
4725        tslc: 0_u8,
4726    };
4727    #[cfg(feature = "arbitrary")]
4728    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4729        use arbitrary::{Arbitrary, Unstructured};
4730        let mut buf = [0u8; 1024];
4731        rng.fill_bytes(&mut buf);
4732        let mut unstructured = Unstructured::new(&buf);
4733        Self::arbitrary(&mut unstructured).unwrap_or_default()
4734    }
4735}
4736impl Default for ADSB_VEHICLE_DATA {
4737    fn default() -> Self {
4738        Self::DEFAULT.clone()
4739    }
4740}
4741impl MessageData for ADSB_VEHICLE_DATA {
4742    type Message = MavMessage;
4743    const ID: u32 = 246u32;
4744    const NAME: &'static str = "ADSB_VEHICLE";
4745    const EXTRA_CRC: u8 = 184u8;
4746    const ENCODED_LEN: usize = 38usize;
4747    fn deser(
4748        _version: MavlinkVersion,
4749        __input: &[u8],
4750    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4751        let avail_len = __input.len();
4752        let mut payload_buf = [0; Self::ENCODED_LEN];
4753        let mut buf = if avail_len < Self::ENCODED_LEN {
4754            payload_buf[0..avail_len].copy_from_slice(__input);
4755            Bytes::new(&payload_buf)
4756        } else {
4757            Bytes::new(__input)
4758        };
4759        let mut __struct = Self::default();
4760        __struct.ICAO_address = buf.get_u32_le();
4761        __struct.lat = buf.get_i32_le();
4762        __struct.lon = buf.get_i32_le();
4763        __struct.altitude = buf.get_i32_le();
4764        __struct.heading = buf.get_u16_le();
4765        __struct.hor_velocity = buf.get_u16_le();
4766        __struct.ver_velocity = buf.get_i16_le();
4767        let tmp = buf.get_u16_le();
4768        __struct.flags = AdsbFlags::from_bits(tmp & AdsbFlags::all().bits()).ok_or(
4769            ::mavlink_core::error::ParserError::InvalidFlag {
4770                flag_type: "AdsbFlags",
4771                value: tmp as u32,
4772            },
4773        )?;
4774        __struct.squawk = buf.get_u16_le();
4775        let tmp = buf.get_u8();
4776        __struct.altitude_type =
4777            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4778                enum_type: "AdsbAltitudeType",
4779                value: tmp as u32,
4780            })?;
4781        for v in &mut __struct.callsign {
4782            let val = buf.get_u8();
4783            *v = val;
4784        }
4785        let tmp = buf.get_u8();
4786        __struct.emitter_type =
4787            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4788                enum_type: "AdsbEmitterType",
4789                value: tmp as u32,
4790            })?;
4791        __struct.tslc = buf.get_u8();
4792        Ok(__struct)
4793    }
4794    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4795        let mut __tmp = BytesMut::new(bytes);
4796        #[allow(clippy::absurd_extreme_comparisons)]
4797        #[allow(unused_comparisons)]
4798        if __tmp.remaining() < Self::ENCODED_LEN {
4799            panic!(
4800                "buffer is too small (need {} bytes, but got {})",
4801                Self::ENCODED_LEN,
4802                __tmp.remaining(),
4803            )
4804        }
4805        __tmp.put_u32_le(self.ICAO_address);
4806        __tmp.put_i32_le(self.lat);
4807        __tmp.put_i32_le(self.lon);
4808        __tmp.put_i32_le(self.altitude);
4809        __tmp.put_u16_le(self.heading);
4810        __tmp.put_u16_le(self.hor_velocity);
4811        __tmp.put_i16_le(self.ver_velocity);
4812        __tmp.put_u16_le(self.flags.bits());
4813        __tmp.put_u16_le(self.squawk);
4814        __tmp.put_u8(self.altitude_type as u8);
4815        for val in &self.callsign {
4816            __tmp.put_u8(*val);
4817        }
4818        __tmp.put_u8(self.emitter_type as u8);
4819        __tmp.put_u8(self.tslc);
4820        if matches!(version, MavlinkVersion::V2) {
4821            let len = __tmp.len();
4822            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4823        } else {
4824            __tmp.len()
4825        }
4826    }
4827}
4828#[doc = "id: 301"]
4829#[doc = "The location and information of an AIS vessel."]
4830#[derive(Debug, Clone, PartialEq)]
4831#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4832#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4833pub struct AIS_VESSEL_DATA {
4834    #[doc = "Mobile Marine Service Identifier, 9 decimal digits"]
4835    pub MMSI: u32,
4836    #[doc = "Latitude"]
4837    pub lat: i32,
4838    #[doc = "Longitude"]
4839    pub lon: i32,
4840    #[doc = "Course over ground"]
4841    pub COG: u16,
4842    #[doc = "True heading"]
4843    pub heading: u16,
4844    #[doc = "Speed over ground"]
4845    pub velocity: u16,
4846    #[doc = "Distance from lat/lon location to bow"]
4847    pub dimension_bow: u16,
4848    #[doc = "Distance from lat/lon location to stern"]
4849    pub dimension_stern: u16,
4850    #[doc = "Time since last communication in seconds"]
4851    pub tslc: u16,
4852    #[doc = "Bitmask to indicate various statuses including valid data fields"]
4853    pub flags: AisFlags,
4854    #[doc = "Turn rate"]
4855    pub turn_rate: i8,
4856    #[doc = "Navigational status"]
4857    pub navigational_status: AisNavStatus,
4858    #[doc = "Type of vessels"]
4859    pub mavtype: AisType,
4860    #[doc = "Distance from lat/lon location to port side"]
4861    pub dimension_port: u8,
4862    #[doc = "Distance from lat/lon location to starboard side"]
4863    pub dimension_starboard: u8,
4864    #[doc = "The vessel callsign"]
4865    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4866    pub callsign: [u8; 7],
4867    #[doc = "The vessel name"]
4868    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4869    pub name: [u8; 20],
4870}
4871impl AIS_VESSEL_DATA {
4872    pub const ENCODED_LEN: usize = 58usize;
4873    pub const DEFAULT: Self = Self {
4874        MMSI: 0_u32,
4875        lat: 0_i32,
4876        lon: 0_i32,
4877        COG: 0_u16,
4878        heading: 0_u16,
4879        velocity: 0_u16,
4880        dimension_bow: 0_u16,
4881        dimension_stern: 0_u16,
4882        tslc: 0_u16,
4883        flags: AisFlags::DEFAULT,
4884        turn_rate: 0_i8,
4885        navigational_status: AisNavStatus::DEFAULT,
4886        mavtype: AisType::DEFAULT,
4887        dimension_port: 0_u8,
4888        dimension_starboard: 0_u8,
4889        callsign: [0_u8; 7usize],
4890        name: [0_u8; 20usize],
4891    };
4892    #[cfg(feature = "arbitrary")]
4893    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4894        use arbitrary::{Arbitrary, Unstructured};
4895        let mut buf = [0u8; 1024];
4896        rng.fill_bytes(&mut buf);
4897        let mut unstructured = Unstructured::new(&buf);
4898        Self::arbitrary(&mut unstructured).unwrap_or_default()
4899    }
4900}
4901impl Default for AIS_VESSEL_DATA {
4902    fn default() -> Self {
4903        Self::DEFAULT.clone()
4904    }
4905}
4906impl MessageData for AIS_VESSEL_DATA {
4907    type Message = MavMessage;
4908    const ID: u32 = 301u32;
4909    const NAME: &'static str = "AIS_VESSEL";
4910    const EXTRA_CRC: u8 = 243u8;
4911    const ENCODED_LEN: usize = 58usize;
4912    fn deser(
4913        _version: MavlinkVersion,
4914        __input: &[u8],
4915    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4916        let avail_len = __input.len();
4917        let mut payload_buf = [0; Self::ENCODED_LEN];
4918        let mut buf = if avail_len < Self::ENCODED_LEN {
4919            payload_buf[0..avail_len].copy_from_slice(__input);
4920            Bytes::new(&payload_buf)
4921        } else {
4922            Bytes::new(__input)
4923        };
4924        let mut __struct = Self::default();
4925        __struct.MMSI = buf.get_u32_le();
4926        __struct.lat = buf.get_i32_le();
4927        __struct.lon = buf.get_i32_le();
4928        __struct.COG = buf.get_u16_le();
4929        __struct.heading = buf.get_u16_le();
4930        __struct.velocity = buf.get_u16_le();
4931        __struct.dimension_bow = buf.get_u16_le();
4932        __struct.dimension_stern = buf.get_u16_le();
4933        __struct.tslc = buf.get_u16_le();
4934        let tmp = buf.get_u16_le();
4935        __struct.flags = AisFlags::from_bits(tmp & AisFlags::all().bits()).ok_or(
4936            ::mavlink_core::error::ParserError::InvalidFlag {
4937                flag_type: "AisFlags",
4938                value: tmp as u32,
4939            },
4940        )?;
4941        __struct.turn_rate = buf.get_i8();
4942        let tmp = buf.get_u8();
4943        __struct.navigational_status =
4944            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4945                enum_type: "AisNavStatus",
4946                value: tmp as u32,
4947            })?;
4948        let tmp = buf.get_u8();
4949        __struct.mavtype =
4950            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4951                enum_type: "AisType",
4952                value: tmp as u32,
4953            })?;
4954        __struct.dimension_port = buf.get_u8();
4955        __struct.dimension_starboard = buf.get_u8();
4956        for v in &mut __struct.callsign {
4957            let val = buf.get_u8();
4958            *v = val;
4959        }
4960        for v in &mut __struct.name {
4961            let val = buf.get_u8();
4962            *v = val;
4963        }
4964        Ok(__struct)
4965    }
4966    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4967        let mut __tmp = BytesMut::new(bytes);
4968        #[allow(clippy::absurd_extreme_comparisons)]
4969        #[allow(unused_comparisons)]
4970        if __tmp.remaining() < Self::ENCODED_LEN {
4971            panic!(
4972                "buffer is too small (need {} bytes, but got {})",
4973                Self::ENCODED_LEN,
4974                __tmp.remaining(),
4975            )
4976        }
4977        __tmp.put_u32_le(self.MMSI);
4978        __tmp.put_i32_le(self.lat);
4979        __tmp.put_i32_le(self.lon);
4980        __tmp.put_u16_le(self.COG);
4981        __tmp.put_u16_le(self.heading);
4982        __tmp.put_u16_le(self.velocity);
4983        __tmp.put_u16_le(self.dimension_bow);
4984        __tmp.put_u16_le(self.dimension_stern);
4985        __tmp.put_u16_le(self.tslc);
4986        __tmp.put_u16_le(self.flags.bits());
4987        __tmp.put_i8(self.turn_rate);
4988        __tmp.put_u8(self.navigational_status as u8);
4989        __tmp.put_u8(self.mavtype as u8);
4990        __tmp.put_u8(self.dimension_port);
4991        __tmp.put_u8(self.dimension_starboard);
4992        for val in &self.callsign {
4993            __tmp.put_u8(*val);
4994        }
4995        for val in &self.name {
4996            __tmp.put_u8(*val);
4997        }
4998        if matches!(version, MavlinkVersion::V2) {
4999            let len = __tmp.len();
5000            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5001        } else {
5002            __tmp.len()
5003        }
5004    }
5005}
5006#[doc = "id: 141"]
5007#[doc = "The current system altitude."]
5008#[derive(Debug, Clone, PartialEq)]
5009#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5010#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5011pub struct ALTITUDE_DATA {
5012    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5013    pub time_usec: u64,
5014    #[doc = "This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights."]
5015    pub altitude_monotonic: f32,
5016    #[doc = "This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output MSL by default and not the WGS84 altitude."]
5017    pub altitude_amsl: f32,
5018    #[doc = "This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive."]
5019    pub altitude_local: f32,
5020    #[doc = "This is the altitude above the home position. It resets on each change of the current home position."]
5021    pub altitude_relative: f32,
5022    #[doc = "This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown."]
5023    pub altitude_terrain: f32,
5024    #[doc = "This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available."]
5025    pub bottom_clearance: f32,
5026}
5027impl ALTITUDE_DATA {
5028    pub const ENCODED_LEN: usize = 32usize;
5029    pub const DEFAULT: Self = Self {
5030        time_usec: 0_u64,
5031        altitude_monotonic: 0.0_f32,
5032        altitude_amsl: 0.0_f32,
5033        altitude_local: 0.0_f32,
5034        altitude_relative: 0.0_f32,
5035        altitude_terrain: 0.0_f32,
5036        bottom_clearance: 0.0_f32,
5037    };
5038    #[cfg(feature = "arbitrary")]
5039    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5040        use arbitrary::{Arbitrary, Unstructured};
5041        let mut buf = [0u8; 1024];
5042        rng.fill_bytes(&mut buf);
5043        let mut unstructured = Unstructured::new(&buf);
5044        Self::arbitrary(&mut unstructured).unwrap_or_default()
5045    }
5046}
5047impl Default for ALTITUDE_DATA {
5048    fn default() -> Self {
5049        Self::DEFAULT.clone()
5050    }
5051}
5052impl MessageData for ALTITUDE_DATA {
5053    type Message = MavMessage;
5054    const ID: u32 = 141u32;
5055    const NAME: &'static str = "ALTITUDE";
5056    const EXTRA_CRC: u8 = 47u8;
5057    const ENCODED_LEN: usize = 32usize;
5058    fn deser(
5059        _version: MavlinkVersion,
5060        __input: &[u8],
5061    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5062        let avail_len = __input.len();
5063        let mut payload_buf = [0; Self::ENCODED_LEN];
5064        let mut buf = if avail_len < Self::ENCODED_LEN {
5065            payload_buf[0..avail_len].copy_from_slice(__input);
5066            Bytes::new(&payload_buf)
5067        } else {
5068            Bytes::new(__input)
5069        };
5070        let mut __struct = Self::default();
5071        __struct.time_usec = buf.get_u64_le();
5072        __struct.altitude_monotonic = buf.get_f32_le();
5073        __struct.altitude_amsl = buf.get_f32_le();
5074        __struct.altitude_local = buf.get_f32_le();
5075        __struct.altitude_relative = buf.get_f32_le();
5076        __struct.altitude_terrain = buf.get_f32_le();
5077        __struct.bottom_clearance = buf.get_f32_le();
5078        Ok(__struct)
5079    }
5080    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5081        let mut __tmp = BytesMut::new(bytes);
5082        #[allow(clippy::absurd_extreme_comparisons)]
5083        #[allow(unused_comparisons)]
5084        if __tmp.remaining() < Self::ENCODED_LEN {
5085            panic!(
5086                "buffer is too small (need {} bytes, but got {})",
5087                Self::ENCODED_LEN,
5088                __tmp.remaining(),
5089            )
5090        }
5091        __tmp.put_u64_le(self.time_usec);
5092        __tmp.put_f32_le(self.altitude_monotonic);
5093        __tmp.put_f32_le(self.altitude_amsl);
5094        __tmp.put_f32_le(self.altitude_local);
5095        __tmp.put_f32_le(self.altitude_relative);
5096        __tmp.put_f32_le(self.altitude_terrain);
5097        __tmp.put_f32_le(self.bottom_clearance);
5098        if matches!(version, MavlinkVersion::V2) {
5099            let len = __tmp.len();
5100            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5101        } else {
5102            __tmp.len()
5103        }
5104    }
5105}
5106#[doc = "id: 30"]
5107#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
5108#[derive(Debug, Clone, PartialEq)]
5109#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5110#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5111pub struct ATTITUDE_DATA {
5112    #[doc = "Timestamp (time since system boot)."]
5113    pub time_boot_ms: u32,
5114    #[doc = "Roll angle (-pi..+pi)"]
5115    pub roll: f32,
5116    #[doc = "Pitch angle (-pi..+pi)"]
5117    pub pitch: f32,
5118    #[doc = "Yaw angle (-pi..+pi)"]
5119    pub yaw: f32,
5120    #[doc = "Roll angular speed"]
5121    pub rollspeed: f32,
5122    #[doc = "Pitch angular speed"]
5123    pub pitchspeed: f32,
5124    #[doc = "Yaw angular speed"]
5125    pub yawspeed: f32,
5126}
5127impl ATTITUDE_DATA {
5128    pub const ENCODED_LEN: usize = 28usize;
5129    pub const DEFAULT: Self = Self {
5130        time_boot_ms: 0_u32,
5131        roll: 0.0_f32,
5132        pitch: 0.0_f32,
5133        yaw: 0.0_f32,
5134        rollspeed: 0.0_f32,
5135        pitchspeed: 0.0_f32,
5136        yawspeed: 0.0_f32,
5137    };
5138    #[cfg(feature = "arbitrary")]
5139    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5140        use arbitrary::{Arbitrary, Unstructured};
5141        let mut buf = [0u8; 1024];
5142        rng.fill_bytes(&mut buf);
5143        let mut unstructured = Unstructured::new(&buf);
5144        Self::arbitrary(&mut unstructured).unwrap_or_default()
5145    }
5146}
5147impl Default for ATTITUDE_DATA {
5148    fn default() -> Self {
5149        Self::DEFAULT.clone()
5150    }
5151}
5152impl MessageData for ATTITUDE_DATA {
5153    type Message = MavMessage;
5154    const ID: u32 = 30u32;
5155    const NAME: &'static str = "ATTITUDE";
5156    const EXTRA_CRC: u8 = 39u8;
5157    const ENCODED_LEN: usize = 28usize;
5158    fn deser(
5159        _version: MavlinkVersion,
5160        __input: &[u8],
5161    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5162        let avail_len = __input.len();
5163        let mut payload_buf = [0; Self::ENCODED_LEN];
5164        let mut buf = if avail_len < Self::ENCODED_LEN {
5165            payload_buf[0..avail_len].copy_from_slice(__input);
5166            Bytes::new(&payload_buf)
5167        } else {
5168            Bytes::new(__input)
5169        };
5170        let mut __struct = Self::default();
5171        __struct.time_boot_ms = buf.get_u32_le();
5172        __struct.roll = buf.get_f32_le();
5173        __struct.pitch = buf.get_f32_le();
5174        __struct.yaw = buf.get_f32_le();
5175        __struct.rollspeed = buf.get_f32_le();
5176        __struct.pitchspeed = buf.get_f32_le();
5177        __struct.yawspeed = buf.get_f32_le();
5178        Ok(__struct)
5179    }
5180    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5181        let mut __tmp = BytesMut::new(bytes);
5182        #[allow(clippy::absurd_extreme_comparisons)]
5183        #[allow(unused_comparisons)]
5184        if __tmp.remaining() < Self::ENCODED_LEN {
5185            panic!(
5186                "buffer is too small (need {} bytes, but got {})",
5187                Self::ENCODED_LEN,
5188                __tmp.remaining(),
5189            )
5190        }
5191        __tmp.put_u32_le(self.time_boot_ms);
5192        __tmp.put_f32_le(self.roll);
5193        __tmp.put_f32_le(self.pitch);
5194        __tmp.put_f32_le(self.yaw);
5195        __tmp.put_f32_le(self.rollspeed);
5196        __tmp.put_f32_le(self.pitchspeed);
5197        __tmp.put_f32_le(self.yawspeed);
5198        if matches!(version, MavlinkVersion::V2) {
5199            let len = __tmp.len();
5200            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5201        } else {
5202            __tmp.len()
5203        }
5204    }
5205}
5206#[doc = "id: 31"]
5207#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5208#[derive(Debug, Clone, PartialEq)]
5209#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5210#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5211pub struct ATTITUDE_QUATERNION_DATA {
5212    #[doc = "Timestamp (time since system boot)."]
5213    pub time_boot_ms: u32,
5214    #[doc = "Quaternion component 1, w (1 in null-rotation)"]
5215    pub q1: f32,
5216    #[doc = "Quaternion component 2, x (0 in null-rotation)"]
5217    pub q2: f32,
5218    #[doc = "Quaternion component 3, y (0 in null-rotation)"]
5219    pub q3: f32,
5220    #[doc = "Quaternion component 4, z (0 in null-rotation)"]
5221    pub q4: f32,
5222    #[doc = "Roll angular speed"]
5223    pub rollspeed: f32,
5224    #[doc = "Pitch angular speed"]
5225    pub pitchspeed: f32,
5226    #[doc = "Yaw angular speed"]
5227    pub yawspeed: f32,
5228    #[doc = "Rotation offset by which the attitude quaternion and angular speed vector should be rotated for user display (quaternion with [w, x, y, z] order, zero-rotation is [1, 0, 0, 0], send [0, 0, 0, 0] if field not supported). This field is intended for systems in which the reference attitude may change during flight. For example, tailsitters VTOLs rotate their reference attitude by 90 degrees between hover mode and fixed wing mode, thus repr_offset_q is equal to [1, 0, 0, 0] in hover mode and equal to [0.7071, 0, 0.7071, 0] in fixed wing mode."]
5229    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5230    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5231    pub repr_offset_q: [f32; 4],
5232}
5233impl ATTITUDE_QUATERNION_DATA {
5234    pub const ENCODED_LEN: usize = 48usize;
5235    pub const DEFAULT: Self = Self {
5236        time_boot_ms: 0_u32,
5237        q1: 0.0_f32,
5238        q2: 0.0_f32,
5239        q3: 0.0_f32,
5240        q4: 0.0_f32,
5241        rollspeed: 0.0_f32,
5242        pitchspeed: 0.0_f32,
5243        yawspeed: 0.0_f32,
5244        repr_offset_q: [0.0_f32; 4usize],
5245    };
5246    #[cfg(feature = "arbitrary")]
5247    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5248        use arbitrary::{Arbitrary, Unstructured};
5249        let mut buf = [0u8; 1024];
5250        rng.fill_bytes(&mut buf);
5251        let mut unstructured = Unstructured::new(&buf);
5252        Self::arbitrary(&mut unstructured).unwrap_or_default()
5253    }
5254}
5255impl Default for ATTITUDE_QUATERNION_DATA {
5256    fn default() -> Self {
5257        Self::DEFAULT.clone()
5258    }
5259}
5260impl MessageData for ATTITUDE_QUATERNION_DATA {
5261    type Message = MavMessage;
5262    const ID: u32 = 31u32;
5263    const NAME: &'static str = "ATTITUDE_QUATERNION";
5264    const EXTRA_CRC: u8 = 246u8;
5265    const ENCODED_LEN: usize = 48usize;
5266    fn deser(
5267        _version: MavlinkVersion,
5268        __input: &[u8],
5269    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5270        let avail_len = __input.len();
5271        let mut payload_buf = [0; Self::ENCODED_LEN];
5272        let mut buf = if avail_len < Self::ENCODED_LEN {
5273            payload_buf[0..avail_len].copy_from_slice(__input);
5274            Bytes::new(&payload_buf)
5275        } else {
5276            Bytes::new(__input)
5277        };
5278        let mut __struct = Self::default();
5279        __struct.time_boot_ms = buf.get_u32_le();
5280        __struct.q1 = buf.get_f32_le();
5281        __struct.q2 = buf.get_f32_le();
5282        __struct.q3 = buf.get_f32_le();
5283        __struct.q4 = buf.get_f32_le();
5284        __struct.rollspeed = buf.get_f32_le();
5285        __struct.pitchspeed = buf.get_f32_le();
5286        __struct.yawspeed = buf.get_f32_le();
5287        for v in &mut __struct.repr_offset_q {
5288            let val = buf.get_f32_le();
5289            *v = val;
5290        }
5291        Ok(__struct)
5292    }
5293    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5294        let mut __tmp = BytesMut::new(bytes);
5295        #[allow(clippy::absurd_extreme_comparisons)]
5296        #[allow(unused_comparisons)]
5297        if __tmp.remaining() < Self::ENCODED_LEN {
5298            panic!(
5299                "buffer is too small (need {} bytes, but got {})",
5300                Self::ENCODED_LEN,
5301                __tmp.remaining(),
5302            )
5303        }
5304        __tmp.put_u32_le(self.time_boot_ms);
5305        __tmp.put_f32_le(self.q1);
5306        __tmp.put_f32_le(self.q2);
5307        __tmp.put_f32_le(self.q3);
5308        __tmp.put_f32_le(self.q4);
5309        __tmp.put_f32_le(self.rollspeed);
5310        __tmp.put_f32_le(self.pitchspeed);
5311        __tmp.put_f32_le(self.yawspeed);
5312        for val in &self.repr_offset_q {
5313            __tmp.put_f32_le(*val);
5314        }
5315        if matches!(version, MavlinkVersion::V2) {
5316            let len = __tmp.len();
5317            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5318        } else {
5319            __tmp.len()
5320        }
5321    }
5322}
5323#[doc = "id: 61"]
5324#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5325#[derive(Debug, Clone, PartialEq)]
5326#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5327#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5328pub struct ATTITUDE_QUATERNION_COV_DATA {
5329    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5330    pub time_usec: u64,
5331    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
5332    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5333    pub q: [f32; 4],
5334    #[doc = "Roll angular speed"]
5335    pub rollspeed: f32,
5336    #[doc = "Pitch angular speed"]
5337    pub pitchspeed: f32,
5338    #[doc = "Yaw angular speed"]
5339    pub yawspeed: f32,
5340    #[doc = "Row-major representation of a 3x3 attitude covariance matrix (states: roll, pitch, yaw; first three entries are the first ROW, next three entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
5341    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5342    pub covariance: [f32; 9],
5343}
5344impl ATTITUDE_QUATERNION_COV_DATA {
5345    pub const ENCODED_LEN: usize = 72usize;
5346    pub const DEFAULT: Self = Self {
5347        time_usec: 0_u64,
5348        q: [0.0_f32; 4usize],
5349        rollspeed: 0.0_f32,
5350        pitchspeed: 0.0_f32,
5351        yawspeed: 0.0_f32,
5352        covariance: [0.0_f32; 9usize],
5353    };
5354    #[cfg(feature = "arbitrary")]
5355    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5356        use arbitrary::{Arbitrary, Unstructured};
5357        let mut buf = [0u8; 1024];
5358        rng.fill_bytes(&mut buf);
5359        let mut unstructured = Unstructured::new(&buf);
5360        Self::arbitrary(&mut unstructured).unwrap_or_default()
5361    }
5362}
5363impl Default for ATTITUDE_QUATERNION_COV_DATA {
5364    fn default() -> Self {
5365        Self::DEFAULT.clone()
5366    }
5367}
5368impl MessageData for ATTITUDE_QUATERNION_COV_DATA {
5369    type Message = MavMessage;
5370    const ID: u32 = 61u32;
5371    const NAME: &'static str = "ATTITUDE_QUATERNION_COV";
5372    const EXTRA_CRC: u8 = 167u8;
5373    const ENCODED_LEN: usize = 72usize;
5374    fn deser(
5375        _version: MavlinkVersion,
5376        __input: &[u8],
5377    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5378        let avail_len = __input.len();
5379        let mut payload_buf = [0; Self::ENCODED_LEN];
5380        let mut buf = if avail_len < Self::ENCODED_LEN {
5381            payload_buf[0..avail_len].copy_from_slice(__input);
5382            Bytes::new(&payload_buf)
5383        } else {
5384            Bytes::new(__input)
5385        };
5386        let mut __struct = Self::default();
5387        __struct.time_usec = buf.get_u64_le();
5388        for v in &mut __struct.q {
5389            let val = buf.get_f32_le();
5390            *v = val;
5391        }
5392        __struct.rollspeed = buf.get_f32_le();
5393        __struct.pitchspeed = buf.get_f32_le();
5394        __struct.yawspeed = buf.get_f32_le();
5395        for v in &mut __struct.covariance {
5396            let val = buf.get_f32_le();
5397            *v = val;
5398        }
5399        Ok(__struct)
5400    }
5401    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5402        let mut __tmp = BytesMut::new(bytes);
5403        #[allow(clippy::absurd_extreme_comparisons)]
5404        #[allow(unused_comparisons)]
5405        if __tmp.remaining() < Self::ENCODED_LEN {
5406            panic!(
5407                "buffer is too small (need {} bytes, but got {})",
5408                Self::ENCODED_LEN,
5409                __tmp.remaining(),
5410            )
5411        }
5412        __tmp.put_u64_le(self.time_usec);
5413        for val in &self.q {
5414            __tmp.put_f32_le(*val);
5415        }
5416        __tmp.put_f32_le(self.rollspeed);
5417        __tmp.put_f32_le(self.pitchspeed);
5418        __tmp.put_f32_le(self.yawspeed);
5419        for val in &self.covariance {
5420            __tmp.put_f32_le(*val);
5421        }
5422        if matches!(version, MavlinkVersion::V2) {
5423            let len = __tmp.len();
5424            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5425        } else {
5426            __tmp.len()
5427        }
5428    }
5429}
5430#[doc = "id: 83"]
5431#[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
5432#[derive(Debug, Clone, PartialEq)]
5433#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5434#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5435pub struct ATTITUDE_TARGET_DATA {
5436    #[doc = "Timestamp (time since system boot)."]
5437    pub time_boot_ms: u32,
5438    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5439    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5440    pub q: [f32; 4],
5441    #[doc = "Body roll rate"]
5442    pub body_roll_rate: f32,
5443    #[doc = "Body pitch rate"]
5444    pub body_pitch_rate: f32,
5445    #[doc = "Body yaw rate"]
5446    pub body_yaw_rate: f32,
5447    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
5448    pub thrust: f32,
5449    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
5450    pub type_mask: AttitudeTargetTypemask,
5451}
5452impl ATTITUDE_TARGET_DATA {
5453    pub const ENCODED_LEN: usize = 37usize;
5454    pub const DEFAULT: Self = Self {
5455        time_boot_ms: 0_u32,
5456        q: [0.0_f32; 4usize],
5457        body_roll_rate: 0.0_f32,
5458        body_pitch_rate: 0.0_f32,
5459        body_yaw_rate: 0.0_f32,
5460        thrust: 0.0_f32,
5461        type_mask: AttitudeTargetTypemask::DEFAULT,
5462    };
5463    #[cfg(feature = "arbitrary")]
5464    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5465        use arbitrary::{Arbitrary, Unstructured};
5466        let mut buf = [0u8; 1024];
5467        rng.fill_bytes(&mut buf);
5468        let mut unstructured = Unstructured::new(&buf);
5469        Self::arbitrary(&mut unstructured).unwrap_or_default()
5470    }
5471}
5472impl Default for ATTITUDE_TARGET_DATA {
5473    fn default() -> Self {
5474        Self::DEFAULT.clone()
5475    }
5476}
5477impl MessageData for ATTITUDE_TARGET_DATA {
5478    type Message = MavMessage;
5479    const ID: u32 = 83u32;
5480    const NAME: &'static str = "ATTITUDE_TARGET";
5481    const EXTRA_CRC: u8 = 22u8;
5482    const ENCODED_LEN: usize = 37usize;
5483    fn deser(
5484        _version: MavlinkVersion,
5485        __input: &[u8],
5486    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5487        let avail_len = __input.len();
5488        let mut payload_buf = [0; Self::ENCODED_LEN];
5489        let mut buf = if avail_len < Self::ENCODED_LEN {
5490            payload_buf[0..avail_len].copy_from_slice(__input);
5491            Bytes::new(&payload_buf)
5492        } else {
5493            Bytes::new(__input)
5494        };
5495        let mut __struct = Self::default();
5496        __struct.time_boot_ms = buf.get_u32_le();
5497        for v in &mut __struct.q {
5498            let val = buf.get_f32_le();
5499            *v = val;
5500        }
5501        __struct.body_roll_rate = buf.get_f32_le();
5502        __struct.body_pitch_rate = buf.get_f32_le();
5503        __struct.body_yaw_rate = buf.get_f32_le();
5504        __struct.thrust = buf.get_f32_le();
5505        let tmp = buf.get_u8();
5506        __struct.type_mask = AttitudeTargetTypemask::from_bits(
5507            tmp & AttitudeTargetTypemask::all().bits(),
5508        )
5509        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
5510            flag_type: "AttitudeTargetTypemask",
5511            value: tmp as u32,
5512        })?;
5513        Ok(__struct)
5514    }
5515    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5516        let mut __tmp = BytesMut::new(bytes);
5517        #[allow(clippy::absurd_extreme_comparisons)]
5518        #[allow(unused_comparisons)]
5519        if __tmp.remaining() < Self::ENCODED_LEN {
5520            panic!(
5521                "buffer is too small (need {} bytes, but got {})",
5522                Self::ENCODED_LEN,
5523                __tmp.remaining(),
5524            )
5525        }
5526        __tmp.put_u32_le(self.time_boot_ms);
5527        for val in &self.q {
5528            __tmp.put_f32_le(*val);
5529        }
5530        __tmp.put_f32_le(self.body_roll_rate);
5531        __tmp.put_f32_le(self.body_pitch_rate);
5532        __tmp.put_f32_le(self.body_yaw_rate);
5533        __tmp.put_f32_le(self.thrust);
5534        __tmp.put_u8(self.type_mask.bits());
5535        if matches!(version, MavlinkVersion::V2) {
5536            let len = __tmp.len();
5537            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5538        } else {
5539            __tmp.len()
5540        }
5541    }
5542}
5543#[doc = "id: 138"]
5544#[doc = "Motion capture attitude and position."]
5545#[derive(Debug, Clone, PartialEq)]
5546#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5547#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5548pub struct ATT_POS_MOCAP_DATA {
5549    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5550    pub time_usec: u64,
5551    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5552    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5553    pub q: [f32; 4],
5554    #[doc = "X position (NED)"]
5555    pub x: f32,
5556    #[doc = "Y position (NED)"]
5557    pub y: f32,
5558    #[doc = "Z position (NED)"]
5559    pub z: f32,
5560    #[doc = "Row-major representation of a pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
5561    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5562    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5563    pub covariance: [f32; 21],
5564}
5565impl ATT_POS_MOCAP_DATA {
5566    pub const ENCODED_LEN: usize = 120usize;
5567    pub const DEFAULT: Self = Self {
5568        time_usec: 0_u64,
5569        q: [0.0_f32; 4usize],
5570        x: 0.0_f32,
5571        y: 0.0_f32,
5572        z: 0.0_f32,
5573        covariance: [0.0_f32; 21usize],
5574    };
5575    #[cfg(feature = "arbitrary")]
5576    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5577        use arbitrary::{Arbitrary, Unstructured};
5578        let mut buf = [0u8; 1024];
5579        rng.fill_bytes(&mut buf);
5580        let mut unstructured = Unstructured::new(&buf);
5581        Self::arbitrary(&mut unstructured).unwrap_or_default()
5582    }
5583}
5584impl Default for ATT_POS_MOCAP_DATA {
5585    fn default() -> Self {
5586        Self::DEFAULT.clone()
5587    }
5588}
5589impl MessageData for ATT_POS_MOCAP_DATA {
5590    type Message = MavMessage;
5591    const ID: u32 = 138u32;
5592    const NAME: &'static str = "ATT_POS_MOCAP";
5593    const EXTRA_CRC: u8 = 109u8;
5594    const ENCODED_LEN: usize = 120usize;
5595    fn deser(
5596        _version: MavlinkVersion,
5597        __input: &[u8],
5598    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5599        let avail_len = __input.len();
5600        let mut payload_buf = [0; Self::ENCODED_LEN];
5601        let mut buf = if avail_len < Self::ENCODED_LEN {
5602            payload_buf[0..avail_len].copy_from_slice(__input);
5603            Bytes::new(&payload_buf)
5604        } else {
5605            Bytes::new(__input)
5606        };
5607        let mut __struct = Self::default();
5608        __struct.time_usec = buf.get_u64_le();
5609        for v in &mut __struct.q {
5610            let val = buf.get_f32_le();
5611            *v = val;
5612        }
5613        __struct.x = buf.get_f32_le();
5614        __struct.y = buf.get_f32_le();
5615        __struct.z = buf.get_f32_le();
5616        for v in &mut __struct.covariance {
5617            let val = buf.get_f32_le();
5618            *v = val;
5619        }
5620        Ok(__struct)
5621    }
5622    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5623        let mut __tmp = BytesMut::new(bytes);
5624        #[allow(clippy::absurd_extreme_comparisons)]
5625        #[allow(unused_comparisons)]
5626        if __tmp.remaining() < Self::ENCODED_LEN {
5627            panic!(
5628                "buffer is too small (need {} bytes, but got {})",
5629                Self::ENCODED_LEN,
5630                __tmp.remaining(),
5631            )
5632        }
5633        __tmp.put_u64_le(self.time_usec);
5634        for val in &self.q {
5635            __tmp.put_f32_le(*val);
5636        }
5637        __tmp.put_f32_le(self.x);
5638        __tmp.put_f32_le(self.y);
5639        __tmp.put_f32_le(self.z);
5640        for val in &self.covariance {
5641            __tmp.put_f32_le(*val);
5642        }
5643        if matches!(version, MavlinkVersion::V2) {
5644            let len = __tmp.len();
5645            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5646        } else {
5647            __tmp.len()
5648        }
5649    }
5650}
5651#[doc = "id: 7"]
5652#[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
5653#[derive(Debug, Clone, PartialEq)]
5654#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5655#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5656pub struct AUTH_KEY_DATA {
5657    #[doc = "key"]
5658    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5659    pub key: [u8; 32],
5660}
5661impl AUTH_KEY_DATA {
5662    pub const ENCODED_LEN: usize = 32usize;
5663    pub const DEFAULT: Self = Self {
5664        key: [0_u8; 32usize],
5665    };
5666    #[cfg(feature = "arbitrary")]
5667    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5668        use arbitrary::{Arbitrary, Unstructured};
5669        let mut buf = [0u8; 1024];
5670        rng.fill_bytes(&mut buf);
5671        let mut unstructured = Unstructured::new(&buf);
5672        Self::arbitrary(&mut unstructured).unwrap_or_default()
5673    }
5674}
5675impl Default for AUTH_KEY_DATA {
5676    fn default() -> Self {
5677        Self::DEFAULT.clone()
5678    }
5679}
5680impl MessageData for AUTH_KEY_DATA {
5681    type Message = MavMessage;
5682    const ID: u32 = 7u32;
5683    const NAME: &'static str = "AUTH_KEY";
5684    const EXTRA_CRC: u8 = 119u8;
5685    const ENCODED_LEN: usize = 32usize;
5686    fn deser(
5687        _version: MavlinkVersion,
5688        __input: &[u8],
5689    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5690        let avail_len = __input.len();
5691        let mut payload_buf = [0; Self::ENCODED_LEN];
5692        let mut buf = if avail_len < Self::ENCODED_LEN {
5693            payload_buf[0..avail_len].copy_from_slice(__input);
5694            Bytes::new(&payload_buf)
5695        } else {
5696            Bytes::new(__input)
5697        };
5698        let mut __struct = Self::default();
5699        for v in &mut __struct.key {
5700            let val = buf.get_u8();
5701            *v = val;
5702        }
5703        Ok(__struct)
5704    }
5705    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5706        let mut __tmp = BytesMut::new(bytes);
5707        #[allow(clippy::absurd_extreme_comparisons)]
5708        #[allow(unused_comparisons)]
5709        if __tmp.remaining() < Self::ENCODED_LEN {
5710            panic!(
5711                "buffer is too small (need {} bytes, but got {})",
5712                Self::ENCODED_LEN,
5713                __tmp.remaining(),
5714            )
5715        }
5716        for val in &self.key {
5717            __tmp.put_u8(*val);
5718        }
5719        if matches!(version, MavlinkVersion::V2) {
5720            let len = __tmp.len();
5721            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5722        } else {
5723            __tmp.len()
5724        }
5725    }
5726}
5727#[doc = "id: 286"]
5728#[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
5729#[derive(Debug, Clone, PartialEq)]
5730#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5731#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5732pub struct AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
5733    #[doc = "Timestamp (time since system boot)."]
5734    pub time_boot_us: u64,
5735    #[doc = "Quaternion components of autopilot attitude: w, x, y, z (1 0 0 0 is the null-rotation, Hamilton convention)."]
5736    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5737    pub q: [f32; 4],
5738    #[doc = "Estimated delay of the attitude data. 0 if unknown."]
5739    pub q_estimated_delay_us: u32,
5740    #[doc = "X Speed in NED (North, East, Down). NAN if unknown."]
5741    pub vx: f32,
5742    #[doc = "Y Speed in NED (North, East, Down). NAN if unknown."]
5743    pub vy: f32,
5744    #[doc = "Z Speed in NED (North, East, Down). NAN if unknown."]
5745    pub vz: f32,
5746    #[doc = "Estimated delay of the speed data. 0 if unknown."]
5747    pub v_estimated_delay_us: u32,
5748    #[doc = "Feed forward Z component of angular velocity (positive: yawing to the right). NaN to be ignored. This is to indicate if the autopilot is actively yawing."]
5749    pub feed_forward_angular_velocity_z: f32,
5750    #[doc = "Bitmap indicating which estimator outputs are valid."]
5751    pub estimator_status: EstimatorStatusFlags,
5752    #[doc = "System ID"]
5753    pub target_system: u8,
5754    #[doc = "Component ID"]
5755    pub target_component: u8,
5756    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
5757    pub landed_state: MavLandedState,
5758    #[doc = "Z component of angular velocity in NED (North, East, Down). NaN if unknown."]
5759    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5760    pub angular_velocity_z: f32,
5761}
5762impl AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
5763    pub const ENCODED_LEN: usize = 57usize;
5764    pub const DEFAULT: Self = Self {
5765        time_boot_us: 0_u64,
5766        q: [0.0_f32; 4usize],
5767        q_estimated_delay_us: 0_u32,
5768        vx: 0.0_f32,
5769        vy: 0.0_f32,
5770        vz: 0.0_f32,
5771        v_estimated_delay_us: 0_u32,
5772        feed_forward_angular_velocity_z: 0.0_f32,
5773        estimator_status: EstimatorStatusFlags::DEFAULT,
5774        target_system: 0_u8,
5775        target_component: 0_u8,
5776        landed_state: MavLandedState::DEFAULT,
5777        angular_velocity_z: 0.0_f32,
5778    };
5779    #[cfg(feature = "arbitrary")]
5780    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5781        use arbitrary::{Arbitrary, Unstructured};
5782        let mut buf = [0u8; 1024];
5783        rng.fill_bytes(&mut buf);
5784        let mut unstructured = Unstructured::new(&buf);
5785        Self::arbitrary(&mut unstructured).unwrap_or_default()
5786    }
5787}
5788impl Default for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
5789    fn default() -> Self {
5790        Self::DEFAULT.clone()
5791    }
5792}
5793impl MessageData for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
5794    type Message = MavMessage;
5795    const ID: u32 = 286u32;
5796    const NAME: &'static str = "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE";
5797    const EXTRA_CRC: u8 = 210u8;
5798    const ENCODED_LEN: usize = 57usize;
5799    fn deser(
5800        _version: MavlinkVersion,
5801        __input: &[u8],
5802    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5803        let avail_len = __input.len();
5804        let mut payload_buf = [0; Self::ENCODED_LEN];
5805        let mut buf = if avail_len < Self::ENCODED_LEN {
5806            payload_buf[0..avail_len].copy_from_slice(__input);
5807            Bytes::new(&payload_buf)
5808        } else {
5809            Bytes::new(__input)
5810        };
5811        let mut __struct = Self::default();
5812        __struct.time_boot_us = buf.get_u64_le();
5813        for v in &mut __struct.q {
5814            let val = buf.get_f32_le();
5815            *v = val;
5816        }
5817        __struct.q_estimated_delay_us = buf.get_u32_le();
5818        __struct.vx = buf.get_f32_le();
5819        __struct.vy = buf.get_f32_le();
5820        __struct.vz = buf.get_f32_le();
5821        __struct.v_estimated_delay_us = buf.get_u32_le();
5822        __struct.feed_forward_angular_velocity_z = buf.get_f32_le();
5823        let tmp = buf.get_u16_le();
5824        __struct.estimator_status = EstimatorStatusFlags::from_bits(
5825            tmp & EstimatorStatusFlags::all().bits(),
5826        )
5827        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
5828            flag_type: "EstimatorStatusFlags",
5829            value: tmp as u32,
5830        })?;
5831        __struct.target_system = buf.get_u8();
5832        __struct.target_component = buf.get_u8();
5833        let tmp = buf.get_u8();
5834        __struct.landed_state =
5835            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5836                enum_type: "MavLandedState",
5837                value: tmp as u32,
5838            })?;
5839        __struct.angular_velocity_z = buf.get_f32_le();
5840        Ok(__struct)
5841    }
5842    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5843        let mut __tmp = BytesMut::new(bytes);
5844        #[allow(clippy::absurd_extreme_comparisons)]
5845        #[allow(unused_comparisons)]
5846        if __tmp.remaining() < Self::ENCODED_LEN {
5847            panic!(
5848                "buffer is too small (need {} bytes, but got {})",
5849                Self::ENCODED_LEN,
5850                __tmp.remaining(),
5851            )
5852        }
5853        __tmp.put_u64_le(self.time_boot_us);
5854        for val in &self.q {
5855            __tmp.put_f32_le(*val);
5856        }
5857        __tmp.put_u32_le(self.q_estimated_delay_us);
5858        __tmp.put_f32_le(self.vx);
5859        __tmp.put_f32_le(self.vy);
5860        __tmp.put_f32_le(self.vz);
5861        __tmp.put_u32_le(self.v_estimated_delay_us);
5862        __tmp.put_f32_le(self.feed_forward_angular_velocity_z);
5863        __tmp.put_u16_le(self.estimator_status.bits());
5864        __tmp.put_u8(self.target_system);
5865        __tmp.put_u8(self.target_component);
5866        __tmp.put_u8(self.landed_state as u8);
5867        __tmp.put_f32_le(self.angular_velocity_z);
5868        if matches!(version, MavlinkVersion::V2) {
5869            let len = __tmp.len();
5870            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5871        } else {
5872            __tmp.len()
5873        }
5874    }
5875}
5876#[doc = "id: 148"]
5877#[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
5878#[derive(Debug, Clone, PartialEq)]
5879#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5880#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5881pub struct AUTOPILOT_VERSION_DATA {
5882    #[doc = "Bitmap of capabilities"]
5883    pub capabilities: MavProtocolCapability,
5884    #[doc = "UID if provided by hardware (see uid2)"]
5885    pub uid: u64,
5886    #[doc = "Firmware version number.         The field must be encoded as 4 bytes, where each byte (shown from MSB to LSB) is part of a semantic version: (major) (minor) (patch) (FIRMWARE_VERSION_TYPE)."]
5887    pub flight_sw_version: u32,
5888    #[doc = "Middleware version number"]
5889    pub middleware_sw_version: u32,
5890    #[doc = "Operating system version number"]
5891    pub os_sw_version: u32,
5892    #[doc = "HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify <https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt>"]
5893    pub board_version: u32,
5894    #[doc = "ID of the board vendor"]
5895    pub vendor_id: u16,
5896    #[doc = "ID of the product"]
5897    pub product_id: u16,
5898    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
5899    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5900    pub flight_custom_version: [u8; 8],
5901    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
5902    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5903    pub middleware_custom_version: [u8; 8],
5904    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
5905    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5906    pub os_custom_version: [u8; 8],
5907    #[doc = "UID if provided by hardware (supersedes the uid field. If this is non-zero, use this field, otherwise use uid)"]
5908    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5909    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5910    pub uid2: [u8; 18],
5911}
5912impl AUTOPILOT_VERSION_DATA {
5913    pub const ENCODED_LEN: usize = 78usize;
5914    pub const DEFAULT: Self = Self {
5915        capabilities: MavProtocolCapability::DEFAULT,
5916        uid: 0_u64,
5917        flight_sw_version: 0_u32,
5918        middleware_sw_version: 0_u32,
5919        os_sw_version: 0_u32,
5920        board_version: 0_u32,
5921        vendor_id: 0_u16,
5922        product_id: 0_u16,
5923        flight_custom_version: [0_u8; 8usize],
5924        middleware_custom_version: [0_u8; 8usize],
5925        os_custom_version: [0_u8; 8usize],
5926        uid2: [0_u8; 18usize],
5927    };
5928    #[cfg(feature = "arbitrary")]
5929    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5930        use arbitrary::{Arbitrary, Unstructured};
5931        let mut buf = [0u8; 1024];
5932        rng.fill_bytes(&mut buf);
5933        let mut unstructured = Unstructured::new(&buf);
5934        Self::arbitrary(&mut unstructured).unwrap_or_default()
5935    }
5936}
5937impl Default for AUTOPILOT_VERSION_DATA {
5938    fn default() -> Self {
5939        Self::DEFAULT.clone()
5940    }
5941}
5942impl MessageData for AUTOPILOT_VERSION_DATA {
5943    type Message = MavMessage;
5944    const ID: u32 = 148u32;
5945    const NAME: &'static str = "AUTOPILOT_VERSION";
5946    const EXTRA_CRC: u8 = 178u8;
5947    const ENCODED_LEN: usize = 78usize;
5948    fn deser(
5949        _version: MavlinkVersion,
5950        __input: &[u8],
5951    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5952        let avail_len = __input.len();
5953        let mut payload_buf = [0; Self::ENCODED_LEN];
5954        let mut buf = if avail_len < Self::ENCODED_LEN {
5955            payload_buf[0..avail_len].copy_from_slice(__input);
5956            Bytes::new(&payload_buf)
5957        } else {
5958            Bytes::new(__input)
5959        };
5960        let mut __struct = Self::default();
5961        let tmp = buf.get_u64_le();
5962        __struct.capabilities = MavProtocolCapability::from_bits(
5963            tmp & MavProtocolCapability::all().bits(),
5964        )
5965        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
5966            flag_type: "MavProtocolCapability",
5967            value: tmp as u32,
5968        })?;
5969        __struct.uid = buf.get_u64_le();
5970        __struct.flight_sw_version = buf.get_u32_le();
5971        __struct.middleware_sw_version = buf.get_u32_le();
5972        __struct.os_sw_version = buf.get_u32_le();
5973        __struct.board_version = buf.get_u32_le();
5974        __struct.vendor_id = buf.get_u16_le();
5975        __struct.product_id = buf.get_u16_le();
5976        for v in &mut __struct.flight_custom_version {
5977            let val = buf.get_u8();
5978            *v = val;
5979        }
5980        for v in &mut __struct.middleware_custom_version {
5981            let val = buf.get_u8();
5982            *v = val;
5983        }
5984        for v in &mut __struct.os_custom_version {
5985            let val = buf.get_u8();
5986            *v = val;
5987        }
5988        for v in &mut __struct.uid2 {
5989            let val = buf.get_u8();
5990            *v = val;
5991        }
5992        Ok(__struct)
5993    }
5994    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5995        let mut __tmp = BytesMut::new(bytes);
5996        #[allow(clippy::absurd_extreme_comparisons)]
5997        #[allow(unused_comparisons)]
5998        if __tmp.remaining() < Self::ENCODED_LEN {
5999            panic!(
6000                "buffer is too small (need {} bytes, but got {})",
6001                Self::ENCODED_LEN,
6002                __tmp.remaining(),
6003            )
6004        }
6005        __tmp.put_u64_le(self.capabilities.bits());
6006        __tmp.put_u64_le(self.uid);
6007        __tmp.put_u32_le(self.flight_sw_version);
6008        __tmp.put_u32_le(self.middleware_sw_version);
6009        __tmp.put_u32_le(self.os_sw_version);
6010        __tmp.put_u32_le(self.board_version);
6011        __tmp.put_u16_le(self.vendor_id);
6012        __tmp.put_u16_le(self.product_id);
6013        for val in &self.flight_custom_version {
6014            __tmp.put_u8(*val);
6015        }
6016        for val in &self.middleware_custom_version {
6017            __tmp.put_u8(*val);
6018        }
6019        for val in &self.os_custom_version {
6020            __tmp.put_u8(*val);
6021        }
6022        for val in &self.uid2 {
6023            __tmp.put_u8(*val);
6024        }
6025        if matches!(version, MavlinkVersion::V2) {
6026            let len = __tmp.len();
6027            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6028        } else {
6029            __tmp.len()
6030        }
6031    }
6032}
6033#[doc = "id: 435"]
6034#[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
6035#[derive(Debug, Clone, PartialEq)]
6036#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6037#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6038pub struct AVAILABLE_MODES_DATA {
6039    #[doc = "A bitfield for use for autopilot-specific flags"]
6040    pub custom_mode: u32,
6041    #[doc = "Mode properties."]
6042    pub properties: MavModeProperty,
6043    #[doc = "The total number of available modes for the current vehicle type."]
6044    pub number_modes: u8,
6045    #[doc = "The current mode index within number_modes, indexed from 1. The index is not guaranteed to be persistent, and may change between reboots or if the set of modes change."]
6046    pub mode_index: u8,
6047    #[doc = "Standard mode."]
6048    pub standard_mode: MavStandardMode,
6049    #[doc = "Name of custom mode, with null termination character. Should be omitted for standard modes."]
6050    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6051    pub mode_name: [u8; 35],
6052}
6053impl AVAILABLE_MODES_DATA {
6054    pub const ENCODED_LEN: usize = 46usize;
6055    pub const DEFAULT: Self = Self {
6056        custom_mode: 0_u32,
6057        properties: MavModeProperty::DEFAULT,
6058        number_modes: 0_u8,
6059        mode_index: 0_u8,
6060        standard_mode: MavStandardMode::DEFAULT,
6061        mode_name: [0_u8; 35usize],
6062    };
6063    #[cfg(feature = "arbitrary")]
6064    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6065        use arbitrary::{Arbitrary, Unstructured};
6066        let mut buf = [0u8; 1024];
6067        rng.fill_bytes(&mut buf);
6068        let mut unstructured = Unstructured::new(&buf);
6069        Self::arbitrary(&mut unstructured).unwrap_or_default()
6070    }
6071}
6072impl Default for AVAILABLE_MODES_DATA {
6073    fn default() -> Self {
6074        Self::DEFAULT.clone()
6075    }
6076}
6077impl MessageData for AVAILABLE_MODES_DATA {
6078    type Message = MavMessage;
6079    const ID: u32 = 435u32;
6080    const NAME: &'static str = "AVAILABLE_MODES";
6081    const EXTRA_CRC: u8 = 134u8;
6082    const ENCODED_LEN: usize = 46usize;
6083    fn deser(
6084        _version: MavlinkVersion,
6085        __input: &[u8],
6086    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6087        let avail_len = __input.len();
6088        let mut payload_buf = [0; Self::ENCODED_LEN];
6089        let mut buf = if avail_len < Self::ENCODED_LEN {
6090            payload_buf[0..avail_len].copy_from_slice(__input);
6091            Bytes::new(&payload_buf)
6092        } else {
6093            Bytes::new(__input)
6094        };
6095        let mut __struct = Self::default();
6096        __struct.custom_mode = buf.get_u32_le();
6097        let tmp = buf.get_u32_le();
6098        __struct.properties = MavModeProperty::from_bits(tmp & MavModeProperty::all().bits())
6099            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6100                flag_type: "MavModeProperty",
6101                value: tmp as u32,
6102            })?;
6103        __struct.number_modes = buf.get_u8();
6104        __struct.mode_index = buf.get_u8();
6105        let tmp = buf.get_u8();
6106        __struct.standard_mode =
6107            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6108                enum_type: "MavStandardMode",
6109                value: tmp as u32,
6110            })?;
6111        for v in &mut __struct.mode_name {
6112            let val = buf.get_u8();
6113            *v = val;
6114        }
6115        Ok(__struct)
6116    }
6117    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6118        let mut __tmp = BytesMut::new(bytes);
6119        #[allow(clippy::absurd_extreme_comparisons)]
6120        #[allow(unused_comparisons)]
6121        if __tmp.remaining() < Self::ENCODED_LEN {
6122            panic!(
6123                "buffer is too small (need {} bytes, but got {})",
6124                Self::ENCODED_LEN,
6125                __tmp.remaining(),
6126            )
6127        }
6128        __tmp.put_u32_le(self.custom_mode);
6129        __tmp.put_u32_le(self.properties.bits());
6130        __tmp.put_u8(self.number_modes);
6131        __tmp.put_u8(self.mode_index);
6132        __tmp.put_u8(self.standard_mode as u8);
6133        for val in &self.mode_name {
6134            __tmp.put_u8(*val);
6135        }
6136        if matches!(version, MavlinkVersion::V2) {
6137            let len = __tmp.len();
6138            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6139        } else {
6140            __tmp.len()
6141        }
6142    }
6143}
6144#[doc = "id: 437"]
6145#[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
6146#[derive(Debug, Clone, PartialEq)]
6147#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6148#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6149pub struct AVAILABLE_MODES_MONITOR_DATA {
6150    #[doc = "Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically)."]
6151    pub seq: u8,
6152}
6153impl AVAILABLE_MODES_MONITOR_DATA {
6154    pub const ENCODED_LEN: usize = 1usize;
6155    pub const DEFAULT: Self = Self { seq: 0_u8 };
6156    #[cfg(feature = "arbitrary")]
6157    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6158        use arbitrary::{Arbitrary, Unstructured};
6159        let mut buf = [0u8; 1024];
6160        rng.fill_bytes(&mut buf);
6161        let mut unstructured = Unstructured::new(&buf);
6162        Self::arbitrary(&mut unstructured).unwrap_or_default()
6163    }
6164}
6165impl Default for AVAILABLE_MODES_MONITOR_DATA {
6166    fn default() -> Self {
6167        Self::DEFAULT.clone()
6168    }
6169}
6170impl MessageData for AVAILABLE_MODES_MONITOR_DATA {
6171    type Message = MavMessage;
6172    const ID: u32 = 437u32;
6173    const NAME: &'static str = "AVAILABLE_MODES_MONITOR";
6174    const EXTRA_CRC: u8 = 30u8;
6175    const ENCODED_LEN: usize = 1usize;
6176    fn deser(
6177        _version: MavlinkVersion,
6178        __input: &[u8],
6179    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6180        let avail_len = __input.len();
6181        let mut payload_buf = [0; Self::ENCODED_LEN];
6182        let mut buf = if avail_len < Self::ENCODED_LEN {
6183            payload_buf[0..avail_len].copy_from_slice(__input);
6184            Bytes::new(&payload_buf)
6185        } else {
6186            Bytes::new(__input)
6187        };
6188        let mut __struct = Self::default();
6189        __struct.seq = buf.get_u8();
6190        Ok(__struct)
6191    }
6192    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6193        let mut __tmp = BytesMut::new(bytes);
6194        #[allow(clippy::absurd_extreme_comparisons)]
6195        #[allow(unused_comparisons)]
6196        if __tmp.remaining() < Self::ENCODED_LEN {
6197            panic!(
6198                "buffer is too small (need {} bytes, but got {})",
6199                Self::ENCODED_LEN,
6200                __tmp.remaining(),
6201            )
6202        }
6203        __tmp.put_u8(self.seq);
6204        if matches!(version, MavlinkVersion::V2) {
6205            let len = __tmp.len();
6206            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6207        } else {
6208            __tmp.len()
6209        }
6210    }
6211}
6212#[doc = "id: 372"]
6213#[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
6214#[derive(Debug, Clone, PartialEq)]
6215#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6216#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6217pub struct BATTERY_INFO_DATA {
6218    #[doc = "Minimum per-cell voltage when discharging. 0: field not provided."]
6219    pub discharge_minimum_voltage: f32,
6220    #[doc = "Minimum per-cell voltage when charging. 0: field not provided."]
6221    pub charging_minimum_voltage: f32,
6222    #[doc = "Minimum per-cell voltage when resting. 0: field not provided."]
6223    pub resting_minimum_voltage: f32,
6224    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
6225    pub charging_maximum_voltage: f32,
6226    #[doc = "Maximum pack continuous charge current. 0: field not provided."]
6227    pub charging_maximum_current: f32,
6228    #[doc = "Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided."]
6229    pub nominal_voltage: f32,
6230    #[doc = "Maximum pack discharge current. 0: field not provided."]
6231    pub discharge_maximum_current: f32,
6232    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
6233    pub discharge_maximum_burst_current: f32,
6234    #[doc = "Fully charged design capacity. 0: field not provided."]
6235    pub design_capacity: f32,
6236    #[doc = "Predicted battery capacity when fully charged (accounting for battery degradation). NAN: field not provided."]
6237    pub full_charge_capacity: f32,
6238    #[doc = "Lifetime count of the number of charge/discharge cycles (<https://en.wikipedia.org/wiki/Charge_cycle>). UINT16_MAX: field not provided."]
6239    pub cycle_count: u16,
6240    #[doc = "Battery weight. 0: field not provided."]
6241    pub weight: u16,
6242    #[doc = "Battery ID"]
6243    pub id: u8,
6244    #[doc = "Function of the battery."]
6245    pub battery_function: MavBatteryFunction,
6246    #[doc = "Type (chemistry) of the battery."]
6247    pub mavtype: MavBatteryType,
6248    #[doc = "State of Health (SOH) estimate. Typically 100% at the time of manufacture and will decrease over time and use. -1: field not provided."]
6249    pub state_of_health: u8,
6250    #[doc = "Number of battery cells in series. 0: field not provided."]
6251    pub cells_in_series: u8,
6252    #[doc = "Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
6253    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6254    pub manufacture_date: [u8; 9],
6255    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
6256    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6257    pub serial_number: [u8; 32],
6258    #[doc = "Battery device name. Formatted as manufacturer name then product name, separated with an underscore (in ASCII characters), 0 terminated. All 0: field not provided."]
6259    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6260    pub name: [u8; 50],
6261}
6262impl BATTERY_INFO_DATA {
6263    pub const ENCODED_LEN: usize = 140usize;
6264    pub const DEFAULT: Self = Self {
6265        discharge_minimum_voltage: 0.0_f32,
6266        charging_minimum_voltage: 0.0_f32,
6267        resting_minimum_voltage: 0.0_f32,
6268        charging_maximum_voltage: 0.0_f32,
6269        charging_maximum_current: 0.0_f32,
6270        nominal_voltage: 0.0_f32,
6271        discharge_maximum_current: 0.0_f32,
6272        discharge_maximum_burst_current: 0.0_f32,
6273        design_capacity: 0.0_f32,
6274        full_charge_capacity: 0.0_f32,
6275        cycle_count: 0_u16,
6276        weight: 0_u16,
6277        id: 0_u8,
6278        battery_function: MavBatteryFunction::DEFAULT,
6279        mavtype: MavBatteryType::DEFAULT,
6280        state_of_health: 0_u8,
6281        cells_in_series: 0_u8,
6282        manufacture_date: [0_u8; 9usize],
6283        serial_number: [0_u8; 32usize],
6284        name: [0_u8; 50usize],
6285    };
6286    #[cfg(feature = "arbitrary")]
6287    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6288        use arbitrary::{Arbitrary, Unstructured};
6289        let mut buf = [0u8; 1024];
6290        rng.fill_bytes(&mut buf);
6291        let mut unstructured = Unstructured::new(&buf);
6292        Self::arbitrary(&mut unstructured).unwrap_or_default()
6293    }
6294}
6295impl Default for BATTERY_INFO_DATA {
6296    fn default() -> Self {
6297        Self::DEFAULT.clone()
6298    }
6299}
6300impl MessageData for BATTERY_INFO_DATA {
6301    type Message = MavMessage;
6302    const ID: u32 = 372u32;
6303    const NAME: &'static str = "BATTERY_INFO";
6304    const EXTRA_CRC: u8 = 26u8;
6305    const ENCODED_LEN: usize = 140usize;
6306    fn deser(
6307        _version: MavlinkVersion,
6308        __input: &[u8],
6309    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6310        let avail_len = __input.len();
6311        let mut payload_buf = [0; Self::ENCODED_LEN];
6312        let mut buf = if avail_len < Self::ENCODED_LEN {
6313            payload_buf[0..avail_len].copy_from_slice(__input);
6314            Bytes::new(&payload_buf)
6315        } else {
6316            Bytes::new(__input)
6317        };
6318        let mut __struct = Self::default();
6319        __struct.discharge_minimum_voltage = buf.get_f32_le();
6320        __struct.charging_minimum_voltage = buf.get_f32_le();
6321        __struct.resting_minimum_voltage = buf.get_f32_le();
6322        __struct.charging_maximum_voltage = buf.get_f32_le();
6323        __struct.charging_maximum_current = buf.get_f32_le();
6324        __struct.nominal_voltage = buf.get_f32_le();
6325        __struct.discharge_maximum_current = buf.get_f32_le();
6326        __struct.discharge_maximum_burst_current = buf.get_f32_le();
6327        __struct.design_capacity = buf.get_f32_le();
6328        __struct.full_charge_capacity = buf.get_f32_le();
6329        __struct.cycle_count = buf.get_u16_le();
6330        __struct.weight = buf.get_u16_le();
6331        __struct.id = buf.get_u8();
6332        let tmp = buf.get_u8();
6333        __struct.battery_function =
6334            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6335                enum_type: "MavBatteryFunction",
6336                value: tmp as u32,
6337            })?;
6338        let tmp = buf.get_u8();
6339        __struct.mavtype =
6340            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6341                enum_type: "MavBatteryType",
6342                value: tmp as u32,
6343            })?;
6344        __struct.state_of_health = buf.get_u8();
6345        __struct.cells_in_series = buf.get_u8();
6346        for v in &mut __struct.manufacture_date {
6347            let val = buf.get_u8();
6348            *v = val;
6349        }
6350        for v in &mut __struct.serial_number {
6351            let val = buf.get_u8();
6352            *v = val;
6353        }
6354        for v in &mut __struct.name {
6355            let val = buf.get_u8();
6356            *v = val;
6357        }
6358        Ok(__struct)
6359    }
6360    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6361        let mut __tmp = BytesMut::new(bytes);
6362        #[allow(clippy::absurd_extreme_comparisons)]
6363        #[allow(unused_comparisons)]
6364        if __tmp.remaining() < Self::ENCODED_LEN {
6365            panic!(
6366                "buffer is too small (need {} bytes, but got {})",
6367                Self::ENCODED_LEN,
6368                __tmp.remaining(),
6369            )
6370        }
6371        __tmp.put_f32_le(self.discharge_minimum_voltage);
6372        __tmp.put_f32_le(self.charging_minimum_voltage);
6373        __tmp.put_f32_le(self.resting_minimum_voltage);
6374        __tmp.put_f32_le(self.charging_maximum_voltage);
6375        __tmp.put_f32_le(self.charging_maximum_current);
6376        __tmp.put_f32_le(self.nominal_voltage);
6377        __tmp.put_f32_le(self.discharge_maximum_current);
6378        __tmp.put_f32_le(self.discharge_maximum_burst_current);
6379        __tmp.put_f32_le(self.design_capacity);
6380        __tmp.put_f32_le(self.full_charge_capacity);
6381        __tmp.put_u16_le(self.cycle_count);
6382        __tmp.put_u16_le(self.weight);
6383        __tmp.put_u8(self.id);
6384        __tmp.put_u8(self.battery_function as u8);
6385        __tmp.put_u8(self.mavtype as u8);
6386        __tmp.put_u8(self.state_of_health);
6387        __tmp.put_u8(self.cells_in_series);
6388        for val in &self.manufacture_date {
6389            __tmp.put_u8(*val);
6390        }
6391        for val in &self.serial_number {
6392            __tmp.put_u8(*val);
6393        }
6394        for val in &self.name {
6395            __tmp.put_u8(*val);
6396        }
6397        if matches!(version, MavlinkVersion::V2) {
6398            let len = __tmp.len();
6399            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6400        } else {
6401            __tmp.len()
6402        }
6403    }
6404}
6405#[doc = "id: 147"]
6406#[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
6407#[derive(Debug, Clone, PartialEq)]
6408#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6409#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6410pub struct BATTERY_STATUS_DATA {
6411    #[doc = "Consumed charge, -1: autopilot does not provide consumption estimate"]
6412    pub current_consumed: i32,
6413    #[doc = "Consumed energy, -1: autopilot does not provide energy consumption estimate"]
6414    pub energy_consumed: i32,
6415    #[doc = "Temperature of the battery. INT16_MAX for unknown temperature."]
6416    pub temperature: i16,
6417    #[doc = "Battery voltage of cells 1 to 10 (see voltages_ext for cells 11-14). Cells in this field above the valid cell count for this battery should have the UINT16_MAX value. If individual cell voltages are unknown or not measured for this battery, then the overall battery voltage should be filled in cell 0, with all others set to UINT16_MAX. If the voltage of the battery is greater than (UINT16_MAX - 1), then cell 0 should be set to (UINT16_MAX - 1), and cell 1 to the remaining voltage. This can be extended to multiple cells if the total voltage is greater than 2 * (UINT16_MAX - 1)."]
6418    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6419    pub voltages: [u16; 10],
6420    #[doc = "Battery current, -1: autopilot does not measure the current"]
6421    pub current_battery: i16,
6422    #[doc = "Battery ID"]
6423    pub id: u8,
6424    #[doc = "Function of the battery"]
6425    pub battery_function: MavBatteryFunction,
6426    #[doc = "Type (chemistry) of the battery"]
6427    pub mavtype: MavBatteryType,
6428    #[doc = "Remaining battery energy. Values: [0-100], -1: autopilot does not estimate the remaining battery."]
6429    pub battery_remaining: i8,
6430    #[doc = "Remaining battery time, 0: autopilot does not provide remaining battery time estimate"]
6431    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6432    pub time_remaining: i32,
6433    #[doc = "State for extent of discharge, provided by autopilot for warning or external reactions"]
6434    #[cfg_attr(feature = "serde", serde(default))]
6435    pub charge_state: MavBatteryChargeState,
6436    #[doc = "Battery voltages for cells 11 to 14. Cells above the valid cell count for this battery should have a value of 0, where zero indicates not supported (note, this is different than for the voltages field and allows empty byte truncation). If the measured value is 0 then 1 should be sent instead."]
6437    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6438    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6439    pub voltages_ext: [u16; 4],
6440    #[doc = "Battery mode. Default (0) is that battery mode reporting is not supported or battery is in normal-use mode."]
6441    #[cfg_attr(feature = "serde", serde(default))]
6442    pub mode: MavBatteryMode,
6443    #[doc = "Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported)."]
6444    #[cfg_attr(feature = "serde", serde(default))]
6445    pub fault_bitmask: MavBatteryFault,
6446}
6447impl BATTERY_STATUS_DATA {
6448    pub const ENCODED_LEN: usize = 54usize;
6449    pub const DEFAULT: Self = Self {
6450        current_consumed: 0_i32,
6451        energy_consumed: 0_i32,
6452        temperature: 0_i16,
6453        voltages: [0_u16; 10usize],
6454        current_battery: 0_i16,
6455        id: 0_u8,
6456        battery_function: MavBatteryFunction::DEFAULT,
6457        mavtype: MavBatteryType::DEFAULT,
6458        battery_remaining: 0_i8,
6459        time_remaining: 0_i32,
6460        charge_state: MavBatteryChargeState::DEFAULT,
6461        voltages_ext: [0_u16; 4usize],
6462        mode: MavBatteryMode::DEFAULT,
6463        fault_bitmask: MavBatteryFault::DEFAULT,
6464    };
6465    #[cfg(feature = "arbitrary")]
6466    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6467        use arbitrary::{Arbitrary, Unstructured};
6468        let mut buf = [0u8; 1024];
6469        rng.fill_bytes(&mut buf);
6470        let mut unstructured = Unstructured::new(&buf);
6471        Self::arbitrary(&mut unstructured).unwrap_or_default()
6472    }
6473}
6474impl Default for BATTERY_STATUS_DATA {
6475    fn default() -> Self {
6476        Self::DEFAULT.clone()
6477    }
6478}
6479impl MessageData for BATTERY_STATUS_DATA {
6480    type Message = MavMessage;
6481    const ID: u32 = 147u32;
6482    const NAME: &'static str = "BATTERY_STATUS";
6483    const EXTRA_CRC: u8 = 154u8;
6484    const ENCODED_LEN: usize = 54usize;
6485    fn deser(
6486        _version: MavlinkVersion,
6487        __input: &[u8],
6488    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6489        let avail_len = __input.len();
6490        let mut payload_buf = [0; Self::ENCODED_LEN];
6491        let mut buf = if avail_len < Self::ENCODED_LEN {
6492            payload_buf[0..avail_len].copy_from_slice(__input);
6493            Bytes::new(&payload_buf)
6494        } else {
6495            Bytes::new(__input)
6496        };
6497        let mut __struct = Self::default();
6498        __struct.current_consumed = buf.get_i32_le();
6499        __struct.energy_consumed = buf.get_i32_le();
6500        __struct.temperature = buf.get_i16_le();
6501        for v in &mut __struct.voltages {
6502            let val = buf.get_u16_le();
6503            *v = val;
6504        }
6505        __struct.current_battery = buf.get_i16_le();
6506        __struct.id = buf.get_u8();
6507        let tmp = buf.get_u8();
6508        __struct.battery_function =
6509            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6510                enum_type: "MavBatteryFunction",
6511                value: tmp as u32,
6512            })?;
6513        let tmp = buf.get_u8();
6514        __struct.mavtype =
6515            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6516                enum_type: "MavBatteryType",
6517                value: tmp as u32,
6518            })?;
6519        __struct.battery_remaining = buf.get_i8();
6520        __struct.time_remaining = buf.get_i32_le();
6521        let tmp = buf.get_u8();
6522        __struct.charge_state =
6523            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6524                enum_type: "MavBatteryChargeState",
6525                value: tmp as u32,
6526            })?;
6527        for v in &mut __struct.voltages_ext {
6528            let val = buf.get_u16_le();
6529            *v = val;
6530        }
6531        let tmp = buf.get_u8();
6532        __struct.mode =
6533            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6534                enum_type: "MavBatteryMode",
6535                value: tmp as u32,
6536            })?;
6537        let tmp = buf.get_u32_le();
6538        __struct.fault_bitmask = MavBatteryFault::from_bits(tmp & MavBatteryFault::all().bits())
6539            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6540                flag_type: "MavBatteryFault",
6541                value: tmp as u32,
6542            })?;
6543        Ok(__struct)
6544    }
6545    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6546        let mut __tmp = BytesMut::new(bytes);
6547        #[allow(clippy::absurd_extreme_comparisons)]
6548        #[allow(unused_comparisons)]
6549        if __tmp.remaining() < Self::ENCODED_LEN {
6550            panic!(
6551                "buffer is too small (need {} bytes, but got {})",
6552                Self::ENCODED_LEN,
6553                __tmp.remaining(),
6554            )
6555        }
6556        __tmp.put_i32_le(self.current_consumed);
6557        __tmp.put_i32_le(self.energy_consumed);
6558        __tmp.put_i16_le(self.temperature);
6559        for val in &self.voltages {
6560            __tmp.put_u16_le(*val);
6561        }
6562        __tmp.put_i16_le(self.current_battery);
6563        __tmp.put_u8(self.id);
6564        __tmp.put_u8(self.battery_function as u8);
6565        __tmp.put_u8(self.mavtype as u8);
6566        __tmp.put_i8(self.battery_remaining);
6567        __tmp.put_i32_le(self.time_remaining);
6568        __tmp.put_u8(self.charge_state as u8);
6569        for val in &self.voltages_ext {
6570            __tmp.put_u16_le(*val);
6571        }
6572        __tmp.put_u8(self.mode as u8);
6573        __tmp.put_u32_le(self.fault_bitmask.bits());
6574        if matches!(version, MavlinkVersion::V2) {
6575            let len = __tmp.len();
6576            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6577        } else {
6578            __tmp.len()
6579        }
6580    }
6581}
6582#[doc = "id: 257"]
6583#[doc = "Report button state change."]
6584#[derive(Debug, Clone, PartialEq)]
6585#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6586#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6587pub struct BUTTON_CHANGE_DATA {
6588    #[doc = "Timestamp (time since system boot)."]
6589    pub time_boot_ms: u32,
6590    #[doc = "Time of last change of button state."]
6591    pub last_change_ms: u32,
6592    #[doc = "Bitmap for state of buttons."]
6593    pub state: u8,
6594}
6595impl BUTTON_CHANGE_DATA {
6596    pub const ENCODED_LEN: usize = 9usize;
6597    pub const DEFAULT: Self = Self {
6598        time_boot_ms: 0_u32,
6599        last_change_ms: 0_u32,
6600        state: 0_u8,
6601    };
6602    #[cfg(feature = "arbitrary")]
6603    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6604        use arbitrary::{Arbitrary, Unstructured};
6605        let mut buf = [0u8; 1024];
6606        rng.fill_bytes(&mut buf);
6607        let mut unstructured = Unstructured::new(&buf);
6608        Self::arbitrary(&mut unstructured).unwrap_or_default()
6609    }
6610}
6611impl Default for BUTTON_CHANGE_DATA {
6612    fn default() -> Self {
6613        Self::DEFAULT.clone()
6614    }
6615}
6616impl MessageData for BUTTON_CHANGE_DATA {
6617    type Message = MavMessage;
6618    const ID: u32 = 257u32;
6619    const NAME: &'static str = "BUTTON_CHANGE";
6620    const EXTRA_CRC: u8 = 131u8;
6621    const ENCODED_LEN: usize = 9usize;
6622    fn deser(
6623        _version: MavlinkVersion,
6624        __input: &[u8],
6625    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6626        let avail_len = __input.len();
6627        let mut payload_buf = [0; Self::ENCODED_LEN];
6628        let mut buf = if avail_len < Self::ENCODED_LEN {
6629            payload_buf[0..avail_len].copy_from_slice(__input);
6630            Bytes::new(&payload_buf)
6631        } else {
6632            Bytes::new(__input)
6633        };
6634        let mut __struct = Self::default();
6635        __struct.time_boot_ms = buf.get_u32_le();
6636        __struct.last_change_ms = buf.get_u32_le();
6637        __struct.state = buf.get_u8();
6638        Ok(__struct)
6639    }
6640    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6641        let mut __tmp = BytesMut::new(bytes);
6642        #[allow(clippy::absurd_extreme_comparisons)]
6643        #[allow(unused_comparisons)]
6644        if __tmp.remaining() < Self::ENCODED_LEN {
6645            panic!(
6646                "buffer is too small (need {} bytes, but got {})",
6647                Self::ENCODED_LEN,
6648                __tmp.remaining(),
6649            )
6650        }
6651        __tmp.put_u32_le(self.time_boot_ms);
6652        __tmp.put_u32_le(self.last_change_ms);
6653        __tmp.put_u8(self.state);
6654        if matches!(version, MavlinkVersion::V2) {
6655            let len = __tmp.len();
6656            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6657        } else {
6658            __tmp.len()
6659        }
6660    }
6661}
6662#[doc = "id: 262"]
6663#[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
6664#[derive(Debug, Clone, PartialEq)]
6665#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6666#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6667pub struct CAMERA_CAPTURE_STATUS_DATA {
6668    #[doc = "Timestamp (time since system boot)."]
6669    pub time_boot_ms: u32,
6670    #[doc = "Image capture interval"]
6671    pub image_interval: f32,
6672    #[doc = "Elapsed time since recording started (0: Not supported/available). A GCS should compute recording time and use non-zero values of this field to correct any discrepancy."]
6673    pub recording_time_ms: u32,
6674    #[doc = "Available storage capacity."]
6675    pub available_capacity: f32,
6676    #[doc = "Current status of image capturing (0: idle, 1: capture in progress, 2: interval set but idle, 3: interval set and capture in progress)"]
6677    pub image_status: u8,
6678    #[doc = "Current status of video capturing (0: idle, 1: capture in progress)"]
6679    pub video_status: u8,
6680    #[doc = "Total number of images captured ('forever', or until reset using MAV_CMD_STORAGE_FORMAT)."]
6681    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6682    pub image_count: i32,
6683    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
6684    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6685    pub camera_device_id: u8,
6686}
6687impl CAMERA_CAPTURE_STATUS_DATA {
6688    pub const ENCODED_LEN: usize = 23usize;
6689    pub const DEFAULT: Self = Self {
6690        time_boot_ms: 0_u32,
6691        image_interval: 0.0_f32,
6692        recording_time_ms: 0_u32,
6693        available_capacity: 0.0_f32,
6694        image_status: 0_u8,
6695        video_status: 0_u8,
6696        image_count: 0_i32,
6697        camera_device_id: 0_u8,
6698    };
6699    #[cfg(feature = "arbitrary")]
6700    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6701        use arbitrary::{Arbitrary, Unstructured};
6702        let mut buf = [0u8; 1024];
6703        rng.fill_bytes(&mut buf);
6704        let mut unstructured = Unstructured::new(&buf);
6705        Self::arbitrary(&mut unstructured).unwrap_or_default()
6706    }
6707}
6708impl Default for CAMERA_CAPTURE_STATUS_DATA {
6709    fn default() -> Self {
6710        Self::DEFAULT.clone()
6711    }
6712}
6713impl MessageData for CAMERA_CAPTURE_STATUS_DATA {
6714    type Message = MavMessage;
6715    const ID: u32 = 262u32;
6716    const NAME: &'static str = "CAMERA_CAPTURE_STATUS";
6717    const EXTRA_CRC: u8 = 12u8;
6718    const ENCODED_LEN: usize = 23usize;
6719    fn deser(
6720        _version: MavlinkVersion,
6721        __input: &[u8],
6722    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6723        let avail_len = __input.len();
6724        let mut payload_buf = [0; Self::ENCODED_LEN];
6725        let mut buf = if avail_len < Self::ENCODED_LEN {
6726            payload_buf[0..avail_len].copy_from_slice(__input);
6727            Bytes::new(&payload_buf)
6728        } else {
6729            Bytes::new(__input)
6730        };
6731        let mut __struct = Self::default();
6732        __struct.time_boot_ms = buf.get_u32_le();
6733        __struct.image_interval = buf.get_f32_le();
6734        __struct.recording_time_ms = buf.get_u32_le();
6735        __struct.available_capacity = buf.get_f32_le();
6736        __struct.image_status = buf.get_u8();
6737        __struct.video_status = buf.get_u8();
6738        __struct.image_count = buf.get_i32_le();
6739        __struct.camera_device_id = buf.get_u8();
6740        Ok(__struct)
6741    }
6742    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6743        let mut __tmp = BytesMut::new(bytes);
6744        #[allow(clippy::absurd_extreme_comparisons)]
6745        #[allow(unused_comparisons)]
6746        if __tmp.remaining() < Self::ENCODED_LEN {
6747            panic!(
6748                "buffer is too small (need {} bytes, but got {})",
6749                Self::ENCODED_LEN,
6750                __tmp.remaining(),
6751            )
6752        }
6753        __tmp.put_u32_le(self.time_boot_ms);
6754        __tmp.put_f32_le(self.image_interval);
6755        __tmp.put_u32_le(self.recording_time_ms);
6756        __tmp.put_f32_le(self.available_capacity);
6757        __tmp.put_u8(self.image_status);
6758        __tmp.put_u8(self.video_status);
6759        __tmp.put_i32_le(self.image_count);
6760        __tmp.put_u8(self.camera_device_id);
6761        if matches!(version, MavlinkVersion::V2) {
6762            let len = __tmp.len();
6763            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6764        } else {
6765            __tmp.len()
6766        }
6767    }
6768}
6769#[doc = "id: 271"]
6770#[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
6771#[derive(Debug, Clone, PartialEq)]
6772#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6773#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6774pub struct CAMERA_FOV_STATUS_DATA {
6775    #[doc = "Timestamp (time since system boot)."]
6776    pub time_boot_ms: u32,
6777    #[doc = "Latitude of camera (INT32_MAX if unknown)."]
6778    pub lat_camera: i32,
6779    #[doc = "Longitude of camera (INT32_MAX if unknown)."]
6780    pub lon_camera: i32,
6781    #[doc = "Altitude (MSL) of camera (INT32_MAX if unknown)."]
6782    pub alt_camera: i32,
6783    #[doc = "Latitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
6784    pub lat_image: i32,
6785    #[doc = "Longitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
6786    pub lon_image: i32,
6787    #[doc = "Altitude (MSL) of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
6788    pub alt_image: i32,
6789    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
6790    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6791    pub q: [f32; 4],
6792    #[doc = "Horizontal field of view (NaN if unknown)."]
6793    pub hfov: f32,
6794    #[doc = "Vertical field of view (NaN if unknown)."]
6795    pub vfov: f32,
6796    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
6797    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6798    pub camera_device_id: u8,
6799}
6800impl CAMERA_FOV_STATUS_DATA {
6801    pub const ENCODED_LEN: usize = 53usize;
6802    pub const DEFAULT: Self = Self {
6803        time_boot_ms: 0_u32,
6804        lat_camera: 0_i32,
6805        lon_camera: 0_i32,
6806        alt_camera: 0_i32,
6807        lat_image: 0_i32,
6808        lon_image: 0_i32,
6809        alt_image: 0_i32,
6810        q: [0.0_f32; 4usize],
6811        hfov: 0.0_f32,
6812        vfov: 0.0_f32,
6813        camera_device_id: 0_u8,
6814    };
6815    #[cfg(feature = "arbitrary")]
6816    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6817        use arbitrary::{Arbitrary, Unstructured};
6818        let mut buf = [0u8; 1024];
6819        rng.fill_bytes(&mut buf);
6820        let mut unstructured = Unstructured::new(&buf);
6821        Self::arbitrary(&mut unstructured).unwrap_or_default()
6822    }
6823}
6824impl Default for CAMERA_FOV_STATUS_DATA {
6825    fn default() -> Self {
6826        Self::DEFAULT.clone()
6827    }
6828}
6829impl MessageData for CAMERA_FOV_STATUS_DATA {
6830    type Message = MavMessage;
6831    const ID: u32 = 271u32;
6832    const NAME: &'static str = "CAMERA_FOV_STATUS";
6833    const EXTRA_CRC: u8 = 22u8;
6834    const ENCODED_LEN: usize = 53usize;
6835    fn deser(
6836        _version: MavlinkVersion,
6837        __input: &[u8],
6838    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6839        let avail_len = __input.len();
6840        let mut payload_buf = [0; Self::ENCODED_LEN];
6841        let mut buf = if avail_len < Self::ENCODED_LEN {
6842            payload_buf[0..avail_len].copy_from_slice(__input);
6843            Bytes::new(&payload_buf)
6844        } else {
6845            Bytes::new(__input)
6846        };
6847        let mut __struct = Self::default();
6848        __struct.time_boot_ms = buf.get_u32_le();
6849        __struct.lat_camera = buf.get_i32_le();
6850        __struct.lon_camera = buf.get_i32_le();
6851        __struct.alt_camera = buf.get_i32_le();
6852        __struct.lat_image = buf.get_i32_le();
6853        __struct.lon_image = buf.get_i32_le();
6854        __struct.alt_image = buf.get_i32_le();
6855        for v in &mut __struct.q {
6856            let val = buf.get_f32_le();
6857            *v = val;
6858        }
6859        __struct.hfov = buf.get_f32_le();
6860        __struct.vfov = buf.get_f32_le();
6861        __struct.camera_device_id = buf.get_u8();
6862        Ok(__struct)
6863    }
6864    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6865        let mut __tmp = BytesMut::new(bytes);
6866        #[allow(clippy::absurd_extreme_comparisons)]
6867        #[allow(unused_comparisons)]
6868        if __tmp.remaining() < Self::ENCODED_LEN {
6869            panic!(
6870                "buffer is too small (need {} bytes, but got {})",
6871                Self::ENCODED_LEN,
6872                __tmp.remaining(),
6873            )
6874        }
6875        __tmp.put_u32_le(self.time_boot_ms);
6876        __tmp.put_i32_le(self.lat_camera);
6877        __tmp.put_i32_le(self.lon_camera);
6878        __tmp.put_i32_le(self.alt_camera);
6879        __tmp.put_i32_le(self.lat_image);
6880        __tmp.put_i32_le(self.lon_image);
6881        __tmp.put_i32_le(self.alt_image);
6882        for val in &self.q {
6883            __tmp.put_f32_le(*val);
6884        }
6885        __tmp.put_f32_le(self.hfov);
6886        __tmp.put_f32_le(self.vfov);
6887        __tmp.put_u8(self.camera_device_id);
6888        if matches!(version, MavlinkVersion::V2) {
6889            let len = __tmp.len();
6890            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6891        } else {
6892            __tmp.len()
6893        }
6894    }
6895}
6896#[doc = "id: 263"]
6897#[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
6898#[derive(Debug, Clone, PartialEq)]
6899#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6900#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6901pub struct CAMERA_IMAGE_CAPTURED_DATA {
6902    #[doc = "Timestamp (time since UNIX epoch) in UTC. 0 for unknown."]
6903    pub time_utc: u64,
6904    #[doc = "Timestamp (time since system boot)."]
6905    pub time_boot_ms: u32,
6906    #[doc = "Latitude where image was taken"]
6907    pub lat: i32,
6908    #[doc = "Longitude where capture was taken"]
6909    pub lon: i32,
6910    #[doc = "Altitude (MSL) where image was taken"]
6911    pub alt: i32,
6912    #[doc = "Altitude above ground"]
6913    pub relative_alt: i32,
6914    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
6915    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6916    pub q: [f32; 4],
6917    #[doc = "Zero based index of this image (i.e. a new image will have index CAMERA_CAPTURE_STATUS.image count -1)"]
6918    pub image_index: i32,
6919    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id). Field name is usually camera_device_id."]
6920    pub camera_id: u8,
6921    #[doc = "Boolean indicating success (1) or failure (0) while capturing this image."]
6922    pub capture_result: i8,
6923    #[doc = "URL of image taken. Either local storage or <http://foo.jpg> if camera provides an HTTP interface."]
6924    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6925    pub file_url: [u8; 205],
6926}
6927impl CAMERA_IMAGE_CAPTURED_DATA {
6928    pub const ENCODED_LEN: usize = 255usize;
6929    pub const DEFAULT: Self = Self {
6930        time_utc: 0_u64,
6931        time_boot_ms: 0_u32,
6932        lat: 0_i32,
6933        lon: 0_i32,
6934        alt: 0_i32,
6935        relative_alt: 0_i32,
6936        q: [0.0_f32; 4usize],
6937        image_index: 0_i32,
6938        camera_id: 0_u8,
6939        capture_result: 0_i8,
6940        file_url: [0_u8; 205usize],
6941    };
6942    #[cfg(feature = "arbitrary")]
6943    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6944        use arbitrary::{Arbitrary, Unstructured};
6945        let mut buf = [0u8; 1024];
6946        rng.fill_bytes(&mut buf);
6947        let mut unstructured = Unstructured::new(&buf);
6948        Self::arbitrary(&mut unstructured).unwrap_or_default()
6949    }
6950}
6951impl Default for CAMERA_IMAGE_CAPTURED_DATA {
6952    fn default() -> Self {
6953        Self::DEFAULT.clone()
6954    }
6955}
6956impl MessageData for CAMERA_IMAGE_CAPTURED_DATA {
6957    type Message = MavMessage;
6958    const ID: u32 = 263u32;
6959    const NAME: &'static str = "CAMERA_IMAGE_CAPTURED";
6960    const EXTRA_CRC: u8 = 133u8;
6961    const ENCODED_LEN: usize = 255usize;
6962    fn deser(
6963        _version: MavlinkVersion,
6964        __input: &[u8],
6965    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6966        let avail_len = __input.len();
6967        let mut payload_buf = [0; Self::ENCODED_LEN];
6968        let mut buf = if avail_len < Self::ENCODED_LEN {
6969            payload_buf[0..avail_len].copy_from_slice(__input);
6970            Bytes::new(&payload_buf)
6971        } else {
6972            Bytes::new(__input)
6973        };
6974        let mut __struct = Self::default();
6975        __struct.time_utc = buf.get_u64_le();
6976        __struct.time_boot_ms = buf.get_u32_le();
6977        __struct.lat = buf.get_i32_le();
6978        __struct.lon = buf.get_i32_le();
6979        __struct.alt = buf.get_i32_le();
6980        __struct.relative_alt = buf.get_i32_le();
6981        for v in &mut __struct.q {
6982            let val = buf.get_f32_le();
6983            *v = val;
6984        }
6985        __struct.image_index = buf.get_i32_le();
6986        __struct.camera_id = buf.get_u8();
6987        __struct.capture_result = buf.get_i8();
6988        for v in &mut __struct.file_url {
6989            let val = buf.get_u8();
6990            *v = val;
6991        }
6992        Ok(__struct)
6993    }
6994    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6995        let mut __tmp = BytesMut::new(bytes);
6996        #[allow(clippy::absurd_extreme_comparisons)]
6997        #[allow(unused_comparisons)]
6998        if __tmp.remaining() < Self::ENCODED_LEN {
6999            panic!(
7000                "buffer is too small (need {} bytes, but got {})",
7001                Self::ENCODED_LEN,
7002                __tmp.remaining(),
7003            )
7004        }
7005        __tmp.put_u64_le(self.time_utc);
7006        __tmp.put_u32_le(self.time_boot_ms);
7007        __tmp.put_i32_le(self.lat);
7008        __tmp.put_i32_le(self.lon);
7009        __tmp.put_i32_le(self.alt);
7010        __tmp.put_i32_le(self.relative_alt);
7011        for val in &self.q {
7012            __tmp.put_f32_le(*val);
7013        }
7014        __tmp.put_i32_le(self.image_index);
7015        __tmp.put_u8(self.camera_id);
7016        __tmp.put_i8(self.capture_result);
7017        for val in &self.file_url {
7018            __tmp.put_u8(*val);
7019        }
7020        if matches!(version, MavlinkVersion::V2) {
7021            let len = __tmp.len();
7022            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7023        } else {
7024            __tmp.len()
7025        }
7026    }
7027}
7028#[doc = "id: 259"]
7029#[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7030#[derive(Debug, Clone, PartialEq)]
7031#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7032#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7033pub struct CAMERA_INFORMATION_DATA {
7034    #[doc = "Timestamp (time since system boot)."]
7035    pub time_boot_ms: u32,
7036    #[doc = "0xff). Use 0 if not known."]
7037    pub firmware_version: u32,
7038    #[doc = "Focal length. Use NaN if not known."]
7039    pub focal_length: f32,
7040    #[doc = "Image sensor size horizontal. Use NaN if not known."]
7041    pub sensor_size_h: f32,
7042    #[doc = "Image sensor size vertical. Use NaN if not known."]
7043    pub sensor_size_v: f32,
7044    #[doc = "Bitmap of camera capability flags."]
7045    pub flags: CameraCapFlags,
7046    #[doc = "Horizontal image resolution. Use 0 if not known."]
7047    pub resolution_h: u16,
7048    #[doc = "Vertical image resolution. Use 0 if not known."]
7049    pub resolution_v: u16,
7050    #[doc = "Camera definition version (iteration).  Use 0 if not known."]
7051    pub cam_definition_version: u16,
7052    #[doc = "Name of the camera vendor"]
7053    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7054    pub vendor_name: [u8; 32],
7055    #[doc = "Name of the camera model"]
7056    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7057    pub model_name: [u8; 32],
7058    #[doc = "Reserved for a lens ID.  Use 0 if not known."]
7059    pub lens_id: u8,
7060    #[doc = "Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file). The string needs to be zero terminated.  Use a zero-length string if not known."]
7061    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7062    pub cam_definition_uri: [u8; 140],
7063    #[doc = "Gimbal id of a gimbal associated with this camera. This is the component id of the gimbal device, or 1-6 for non mavlink gimbals. Use 0 if no gimbal is associated with the camera."]
7064    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7065    pub gimbal_device_id: u8,
7066    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7067    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7068    pub camera_device_id: u8,
7069}
7070impl CAMERA_INFORMATION_DATA {
7071    pub const ENCODED_LEN: usize = 237usize;
7072    pub const DEFAULT: Self = Self {
7073        time_boot_ms: 0_u32,
7074        firmware_version: 0_u32,
7075        focal_length: 0.0_f32,
7076        sensor_size_h: 0.0_f32,
7077        sensor_size_v: 0.0_f32,
7078        flags: CameraCapFlags::DEFAULT,
7079        resolution_h: 0_u16,
7080        resolution_v: 0_u16,
7081        cam_definition_version: 0_u16,
7082        vendor_name: [0_u8; 32usize],
7083        model_name: [0_u8; 32usize],
7084        lens_id: 0_u8,
7085        cam_definition_uri: [0_u8; 140usize],
7086        gimbal_device_id: 0_u8,
7087        camera_device_id: 0_u8,
7088    };
7089    #[cfg(feature = "arbitrary")]
7090    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7091        use arbitrary::{Arbitrary, Unstructured};
7092        let mut buf = [0u8; 1024];
7093        rng.fill_bytes(&mut buf);
7094        let mut unstructured = Unstructured::new(&buf);
7095        Self::arbitrary(&mut unstructured).unwrap_or_default()
7096    }
7097}
7098impl Default for CAMERA_INFORMATION_DATA {
7099    fn default() -> Self {
7100        Self::DEFAULT.clone()
7101    }
7102}
7103impl MessageData for CAMERA_INFORMATION_DATA {
7104    type Message = MavMessage;
7105    const ID: u32 = 259u32;
7106    const NAME: &'static str = "CAMERA_INFORMATION";
7107    const EXTRA_CRC: u8 = 92u8;
7108    const ENCODED_LEN: usize = 237usize;
7109    fn deser(
7110        _version: MavlinkVersion,
7111        __input: &[u8],
7112    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7113        let avail_len = __input.len();
7114        let mut payload_buf = [0; Self::ENCODED_LEN];
7115        let mut buf = if avail_len < Self::ENCODED_LEN {
7116            payload_buf[0..avail_len].copy_from_slice(__input);
7117            Bytes::new(&payload_buf)
7118        } else {
7119            Bytes::new(__input)
7120        };
7121        let mut __struct = Self::default();
7122        __struct.time_boot_ms = buf.get_u32_le();
7123        __struct.firmware_version = buf.get_u32_le();
7124        __struct.focal_length = buf.get_f32_le();
7125        __struct.sensor_size_h = buf.get_f32_le();
7126        __struct.sensor_size_v = buf.get_f32_le();
7127        let tmp = buf.get_u32_le();
7128        __struct.flags = CameraCapFlags::from_bits(tmp & CameraCapFlags::all().bits()).ok_or(
7129            ::mavlink_core::error::ParserError::InvalidFlag {
7130                flag_type: "CameraCapFlags",
7131                value: tmp as u32,
7132            },
7133        )?;
7134        __struct.resolution_h = buf.get_u16_le();
7135        __struct.resolution_v = buf.get_u16_le();
7136        __struct.cam_definition_version = buf.get_u16_le();
7137        for v in &mut __struct.vendor_name {
7138            let val = buf.get_u8();
7139            *v = val;
7140        }
7141        for v in &mut __struct.model_name {
7142            let val = buf.get_u8();
7143            *v = val;
7144        }
7145        __struct.lens_id = buf.get_u8();
7146        for v in &mut __struct.cam_definition_uri {
7147            let val = buf.get_u8();
7148            *v = val;
7149        }
7150        __struct.gimbal_device_id = buf.get_u8();
7151        __struct.camera_device_id = buf.get_u8();
7152        Ok(__struct)
7153    }
7154    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7155        let mut __tmp = BytesMut::new(bytes);
7156        #[allow(clippy::absurd_extreme_comparisons)]
7157        #[allow(unused_comparisons)]
7158        if __tmp.remaining() < Self::ENCODED_LEN {
7159            panic!(
7160                "buffer is too small (need {} bytes, but got {})",
7161                Self::ENCODED_LEN,
7162                __tmp.remaining(),
7163            )
7164        }
7165        __tmp.put_u32_le(self.time_boot_ms);
7166        __tmp.put_u32_le(self.firmware_version);
7167        __tmp.put_f32_le(self.focal_length);
7168        __tmp.put_f32_le(self.sensor_size_h);
7169        __tmp.put_f32_le(self.sensor_size_v);
7170        __tmp.put_u32_le(self.flags.bits());
7171        __tmp.put_u16_le(self.resolution_h);
7172        __tmp.put_u16_le(self.resolution_v);
7173        __tmp.put_u16_le(self.cam_definition_version);
7174        for val in &self.vendor_name {
7175            __tmp.put_u8(*val);
7176        }
7177        for val in &self.model_name {
7178            __tmp.put_u8(*val);
7179        }
7180        __tmp.put_u8(self.lens_id);
7181        for val in &self.cam_definition_uri {
7182            __tmp.put_u8(*val);
7183        }
7184        __tmp.put_u8(self.gimbal_device_id);
7185        __tmp.put_u8(self.camera_device_id);
7186        if matches!(version, MavlinkVersion::V2) {
7187            let len = __tmp.len();
7188            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7189        } else {
7190            __tmp.len()
7191        }
7192    }
7193}
7194#[doc = "id: 260"]
7195#[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7196#[derive(Debug, Clone, PartialEq)]
7197#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7198#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7199pub struct CAMERA_SETTINGS_DATA {
7200    #[doc = "Timestamp (time since system boot)."]
7201    pub time_boot_ms: u32,
7202    #[doc = "Camera mode"]
7203    pub mode_id: CameraMode,
7204    #[doc = "Current zoom level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7205    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7206    pub zoomLevel: f32,
7207    #[doc = "Current focus level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7208    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7209    pub focusLevel: f32,
7210    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7211    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7212    pub camera_device_id: u8,
7213}
7214impl CAMERA_SETTINGS_DATA {
7215    pub const ENCODED_LEN: usize = 14usize;
7216    pub const DEFAULT: Self = Self {
7217        time_boot_ms: 0_u32,
7218        mode_id: CameraMode::DEFAULT,
7219        zoomLevel: 0.0_f32,
7220        focusLevel: 0.0_f32,
7221        camera_device_id: 0_u8,
7222    };
7223    #[cfg(feature = "arbitrary")]
7224    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7225        use arbitrary::{Arbitrary, Unstructured};
7226        let mut buf = [0u8; 1024];
7227        rng.fill_bytes(&mut buf);
7228        let mut unstructured = Unstructured::new(&buf);
7229        Self::arbitrary(&mut unstructured).unwrap_or_default()
7230    }
7231}
7232impl Default for CAMERA_SETTINGS_DATA {
7233    fn default() -> Self {
7234        Self::DEFAULT.clone()
7235    }
7236}
7237impl MessageData for CAMERA_SETTINGS_DATA {
7238    type Message = MavMessage;
7239    const ID: u32 = 260u32;
7240    const NAME: &'static str = "CAMERA_SETTINGS";
7241    const EXTRA_CRC: u8 = 146u8;
7242    const ENCODED_LEN: usize = 14usize;
7243    fn deser(
7244        _version: MavlinkVersion,
7245        __input: &[u8],
7246    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7247        let avail_len = __input.len();
7248        let mut payload_buf = [0; Self::ENCODED_LEN];
7249        let mut buf = if avail_len < Self::ENCODED_LEN {
7250            payload_buf[0..avail_len].copy_from_slice(__input);
7251            Bytes::new(&payload_buf)
7252        } else {
7253            Bytes::new(__input)
7254        };
7255        let mut __struct = Self::default();
7256        __struct.time_boot_ms = buf.get_u32_le();
7257        let tmp = buf.get_u8();
7258        __struct.mode_id =
7259            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7260                enum_type: "CameraMode",
7261                value: tmp as u32,
7262            })?;
7263        __struct.zoomLevel = buf.get_f32_le();
7264        __struct.focusLevel = buf.get_f32_le();
7265        __struct.camera_device_id = buf.get_u8();
7266        Ok(__struct)
7267    }
7268    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7269        let mut __tmp = BytesMut::new(bytes);
7270        #[allow(clippy::absurd_extreme_comparisons)]
7271        #[allow(unused_comparisons)]
7272        if __tmp.remaining() < Self::ENCODED_LEN {
7273            panic!(
7274                "buffer is too small (need {} bytes, but got {})",
7275                Self::ENCODED_LEN,
7276                __tmp.remaining(),
7277            )
7278        }
7279        __tmp.put_u32_le(self.time_boot_ms);
7280        __tmp.put_u8(self.mode_id as u8);
7281        __tmp.put_f32_le(self.zoomLevel);
7282        __tmp.put_f32_le(self.focusLevel);
7283        __tmp.put_u8(self.camera_device_id);
7284        if matches!(version, MavlinkVersion::V2) {
7285            let len = __tmp.len();
7286            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7287        } else {
7288            __tmp.len()
7289        }
7290    }
7291}
7292#[doc = "id: 277"]
7293#[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
7294#[derive(Debug, Clone, PartialEq)]
7295#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7296#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7297pub struct CAMERA_THERMAL_RANGE_DATA {
7298    #[doc = "Timestamp (time since system boot)."]
7299    pub time_boot_ms: u32,
7300    #[doc = "Temperature max."]
7301    pub max: f32,
7302    #[doc = "Temperature max point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7303    pub max_point_x: f32,
7304    #[doc = "Temperature max point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7305    pub max_point_y: f32,
7306    #[doc = "Temperature min."]
7307    pub min: f32,
7308    #[doc = "Temperature min point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7309    pub min_point_x: f32,
7310    #[doc = "Temperature min point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7311    pub min_point_y: f32,
7312    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
7313    pub stream_id: u8,
7314    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7315    pub camera_device_id: u8,
7316}
7317impl CAMERA_THERMAL_RANGE_DATA {
7318    pub const ENCODED_LEN: usize = 30usize;
7319    pub const DEFAULT: Self = Self {
7320        time_boot_ms: 0_u32,
7321        max: 0.0_f32,
7322        max_point_x: 0.0_f32,
7323        max_point_y: 0.0_f32,
7324        min: 0.0_f32,
7325        min_point_x: 0.0_f32,
7326        min_point_y: 0.0_f32,
7327        stream_id: 0_u8,
7328        camera_device_id: 0_u8,
7329    };
7330    #[cfg(feature = "arbitrary")]
7331    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7332        use arbitrary::{Arbitrary, Unstructured};
7333        let mut buf = [0u8; 1024];
7334        rng.fill_bytes(&mut buf);
7335        let mut unstructured = Unstructured::new(&buf);
7336        Self::arbitrary(&mut unstructured).unwrap_or_default()
7337    }
7338}
7339impl Default for CAMERA_THERMAL_RANGE_DATA {
7340    fn default() -> Self {
7341        Self::DEFAULT.clone()
7342    }
7343}
7344impl MessageData for CAMERA_THERMAL_RANGE_DATA {
7345    type Message = MavMessage;
7346    const ID: u32 = 277u32;
7347    const NAME: &'static str = "CAMERA_THERMAL_RANGE";
7348    const EXTRA_CRC: u8 = 62u8;
7349    const ENCODED_LEN: usize = 30usize;
7350    fn deser(
7351        _version: MavlinkVersion,
7352        __input: &[u8],
7353    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7354        let avail_len = __input.len();
7355        let mut payload_buf = [0; Self::ENCODED_LEN];
7356        let mut buf = if avail_len < Self::ENCODED_LEN {
7357            payload_buf[0..avail_len].copy_from_slice(__input);
7358            Bytes::new(&payload_buf)
7359        } else {
7360            Bytes::new(__input)
7361        };
7362        let mut __struct = Self::default();
7363        __struct.time_boot_ms = buf.get_u32_le();
7364        __struct.max = buf.get_f32_le();
7365        __struct.max_point_x = buf.get_f32_le();
7366        __struct.max_point_y = buf.get_f32_le();
7367        __struct.min = buf.get_f32_le();
7368        __struct.min_point_x = buf.get_f32_le();
7369        __struct.min_point_y = buf.get_f32_le();
7370        __struct.stream_id = buf.get_u8();
7371        __struct.camera_device_id = buf.get_u8();
7372        Ok(__struct)
7373    }
7374    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7375        let mut __tmp = BytesMut::new(bytes);
7376        #[allow(clippy::absurd_extreme_comparisons)]
7377        #[allow(unused_comparisons)]
7378        if __tmp.remaining() < Self::ENCODED_LEN {
7379            panic!(
7380                "buffer is too small (need {} bytes, but got {})",
7381                Self::ENCODED_LEN,
7382                __tmp.remaining(),
7383            )
7384        }
7385        __tmp.put_u32_le(self.time_boot_ms);
7386        __tmp.put_f32_le(self.max);
7387        __tmp.put_f32_le(self.max_point_x);
7388        __tmp.put_f32_le(self.max_point_y);
7389        __tmp.put_f32_le(self.min);
7390        __tmp.put_f32_le(self.min_point_x);
7391        __tmp.put_f32_le(self.min_point_y);
7392        __tmp.put_u8(self.stream_id);
7393        __tmp.put_u8(self.camera_device_id);
7394        if matches!(version, MavlinkVersion::V2) {
7395            let len = __tmp.len();
7396            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7397        } else {
7398            __tmp.len()
7399        }
7400    }
7401}
7402#[doc = "id: 276"]
7403#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
7404#[derive(Debug, Clone, PartialEq)]
7405#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7406#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7407pub struct CAMERA_TRACKING_GEO_STATUS_DATA {
7408    #[doc = "Latitude of tracked object"]
7409    pub lat: i32,
7410    #[doc = "Longitude of tracked object"]
7411    pub lon: i32,
7412    #[doc = "Altitude of tracked object(AMSL, WGS84)"]
7413    pub alt: f32,
7414    #[doc = "Horizontal accuracy. NAN if unknown"]
7415    pub h_acc: f32,
7416    #[doc = "Vertical accuracy. NAN if unknown"]
7417    pub v_acc: f32,
7418    #[doc = "North velocity of tracked object. NAN if unknown"]
7419    pub vel_n: f32,
7420    #[doc = "East velocity of tracked object. NAN if unknown"]
7421    pub vel_e: f32,
7422    #[doc = "Down velocity of tracked object. NAN if unknown"]
7423    pub vel_d: f32,
7424    #[doc = "Velocity accuracy. NAN if unknown"]
7425    pub vel_acc: f32,
7426    #[doc = "Distance between camera and tracked object. NAN if unknown"]
7427    pub dist: f32,
7428    #[doc = "Heading in radians, in NED. NAN if unknown"]
7429    pub hdg: f32,
7430    #[doc = "Accuracy of heading, in NED. NAN if unknown"]
7431    pub hdg_acc: f32,
7432    #[doc = "Current tracking status"]
7433    pub tracking_status: CameraTrackingStatusFlags,
7434    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7435    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7436    pub camera_device_id: u8,
7437}
7438impl CAMERA_TRACKING_GEO_STATUS_DATA {
7439    pub const ENCODED_LEN: usize = 50usize;
7440    pub const DEFAULT: Self = Self {
7441        lat: 0_i32,
7442        lon: 0_i32,
7443        alt: 0.0_f32,
7444        h_acc: 0.0_f32,
7445        v_acc: 0.0_f32,
7446        vel_n: 0.0_f32,
7447        vel_e: 0.0_f32,
7448        vel_d: 0.0_f32,
7449        vel_acc: 0.0_f32,
7450        dist: 0.0_f32,
7451        hdg: 0.0_f32,
7452        hdg_acc: 0.0_f32,
7453        tracking_status: CameraTrackingStatusFlags::DEFAULT,
7454        camera_device_id: 0_u8,
7455    };
7456    #[cfg(feature = "arbitrary")]
7457    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7458        use arbitrary::{Arbitrary, Unstructured};
7459        let mut buf = [0u8; 1024];
7460        rng.fill_bytes(&mut buf);
7461        let mut unstructured = Unstructured::new(&buf);
7462        Self::arbitrary(&mut unstructured).unwrap_or_default()
7463    }
7464}
7465impl Default for CAMERA_TRACKING_GEO_STATUS_DATA {
7466    fn default() -> Self {
7467        Self::DEFAULT.clone()
7468    }
7469}
7470impl MessageData for CAMERA_TRACKING_GEO_STATUS_DATA {
7471    type Message = MavMessage;
7472    const ID: u32 = 276u32;
7473    const NAME: &'static str = "CAMERA_TRACKING_GEO_STATUS";
7474    const EXTRA_CRC: u8 = 18u8;
7475    const ENCODED_LEN: usize = 50usize;
7476    fn deser(
7477        _version: MavlinkVersion,
7478        __input: &[u8],
7479    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7480        let avail_len = __input.len();
7481        let mut payload_buf = [0; Self::ENCODED_LEN];
7482        let mut buf = if avail_len < Self::ENCODED_LEN {
7483            payload_buf[0..avail_len].copy_from_slice(__input);
7484            Bytes::new(&payload_buf)
7485        } else {
7486            Bytes::new(__input)
7487        };
7488        let mut __struct = Self::default();
7489        __struct.lat = buf.get_i32_le();
7490        __struct.lon = buf.get_i32_le();
7491        __struct.alt = buf.get_f32_le();
7492        __struct.h_acc = buf.get_f32_le();
7493        __struct.v_acc = buf.get_f32_le();
7494        __struct.vel_n = buf.get_f32_le();
7495        __struct.vel_e = buf.get_f32_le();
7496        __struct.vel_d = buf.get_f32_le();
7497        __struct.vel_acc = buf.get_f32_le();
7498        __struct.dist = buf.get_f32_le();
7499        __struct.hdg = buf.get_f32_le();
7500        __struct.hdg_acc = buf.get_f32_le();
7501        let tmp = buf.get_u8();
7502        __struct.tracking_status =
7503            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7504                enum_type: "CameraTrackingStatusFlags",
7505                value: tmp as u32,
7506            })?;
7507        __struct.camera_device_id = buf.get_u8();
7508        Ok(__struct)
7509    }
7510    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7511        let mut __tmp = BytesMut::new(bytes);
7512        #[allow(clippy::absurd_extreme_comparisons)]
7513        #[allow(unused_comparisons)]
7514        if __tmp.remaining() < Self::ENCODED_LEN {
7515            panic!(
7516                "buffer is too small (need {} bytes, but got {})",
7517                Self::ENCODED_LEN,
7518                __tmp.remaining(),
7519            )
7520        }
7521        __tmp.put_i32_le(self.lat);
7522        __tmp.put_i32_le(self.lon);
7523        __tmp.put_f32_le(self.alt);
7524        __tmp.put_f32_le(self.h_acc);
7525        __tmp.put_f32_le(self.v_acc);
7526        __tmp.put_f32_le(self.vel_n);
7527        __tmp.put_f32_le(self.vel_e);
7528        __tmp.put_f32_le(self.vel_d);
7529        __tmp.put_f32_le(self.vel_acc);
7530        __tmp.put_f32_le(self.dist);
7531        __tmp.put_f32_le(self.hdg);
7532        __tmp.put_f32_le(self.hdg_acc);
7533        __tmp.put_u8(self.tracking_status as u8);
7534        __tmp.put_u8(self.camera_device_id);
7535        if matches!(version, MavlinkVersion::V2) {
7536            let len = __tmp.len();
7537            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7538        } else {
7539            __tmp.len()
7540        }
7541    }
7542}
7543#[doc = "id: 275"]
7544#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
7545#[derive(Debug, Clone, PartialEq)]
7546#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7547#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7548pub struct CAMERA_TRACKING_IMAGE_STATUS_DATA {
7549    #[doc = "Current tracked point x value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7550    pub point_x: f32,
7551    #[doc = "Current tracked point y value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7552    pub point_y: f32,
7553    #[doc = "Current tracked radius if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is image left, 1 is image right), NAN if unknown"]
7554    pub radius: f32,
7555    #[doc = "Current tracked rectangle top x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7556    pub rec_top_x: f32,
7557    #[doc = "Current tracked rectangle top y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7558    pub rec_top_y: f32,
7559    #[doc = "Current tracked rectangle bottom x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7560    pub rec_bottom_x: f32,
7561    #[doc = "Current tracked rectangle bottom y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7562    pub rec_bottom_y: f32,
7563    #[doc = "Current tracking status"]
7564    pub tracking_status: CameraTrackingStatusFlags,
7565    #[doc = "Current tracking mode"]
7566    pub tracking_mode: CameraTrackingMode,
7567    #[doc = "Defines location of target data"]
7568    pub target_data: CameraTrackingTargetData,
7569    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7570    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7571    pub camera_device_id: u8,
7572}
7573impl CAMERA_TRACKING_IMAGE_STATUS_DATA {
7574    pub const ENCODED_LEN: usize = 32usize;
7575    pub const DEFAULT: Self = Self {
7576        point_x: 0.0_f32,
7577        point_y: 0.0_f32,
7578        radius: 0.0_f32,
7579        rec_top_x: 0.0_f32,
7580        rec_top_y: 0.0_f32,
7581        rec_bottom_x: 0.0_f32,
7582        rec_bottom_y: 0.0_f32,
7583        tracking_status: CameraTrackingStatusFlags::DEFAULT,
7584        tracking_mode: CameraTrackingMode::DEFAULT,
7585        target_data: CameraTrackingTargetData::DEFAULT,
7586        camera_device_id: 0_u8,
7587    };
7588    #[cfg(feature = "arbitrary")]
7589    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7590        use arbitrary::{Arbitrary, Unstructured};
7591        let mut buf = [0u8; 1024];
7592        rng.fill_bytes(&mut buf);
7593        let mut unstructured = Unstructured::new(&buf);
7594        Self::arbitrary(&mut unstructured).unwrap_or_default()
7595    }
7596}
7597impl Default for CAMERA_TRACKING_IMAGE_STATUS_DATA {
7598    fn default() -> Self {
7599        Self::DEFAULT.clone()
7600    }
7601}
7602impl MessageData for CAMERA_TRACKING_IMAGE_STATUS_DATA {
7603    type Message = MavMessage;
7604    const ID: u32 = 275u32;
7605    const NAME: &'static str = "CAMERA_TRACKING_IMAGE_STATUS";
7606    const EXTRA_CRC: u8 = 126u8;
7607    const ENCODED_LEN: usize = 32usize;
7608    fn deser(
7609        _version: MavlinkVersion,
7610        __input: &[u8],
7611    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7612        let avail_len = __input.len();
7613        let mut payload_buf = [0; Self::ENCODED_LEN];
7614        let mut buf = if avail_len < Self::ENCODED_LEN {
7615            payload_buf[0..avail_len].copy_from_slice(__input);
7616            Bytes::new(&payload_buf)
7617        } else {
7618            Bytes::new(__input)
7619        };
7620        let mut __struct = Self::default();
7621        __struct.point_x = buf.get_f32_le();
7622        __struct.point_y = buf.get_f32_le();
7623        __struct.radius = buf.get_f32_le();
7624        __struct.rec_top_x = buf.get_f32_le();
7625        __struct.rec_top_y = buf.get_f32_le();
7626        __struct.rec_bottom_x = buf.get_f32_le();
7627        __struct.rec_bottom_y = buf.get_f32_le();
7628        let tmp = buf.get_u8();
7629        __struct.tracking_status =
7630            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7631                enum_type: "CameraTrackingStatusFlags",
7632                value: tmp as u32,
7633            })?;
7634        let tmp = buf.get_u8();
7635        __struct.tracking_mode =
7636            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7637                enum_type: "CameraTrackingMode",
7638                value: tmp as u32,
7639            })?;
7640        let tmp = buf.get_u8();
7641        __struct.target_data =
7642            CameraTrackingTargetData::from_bits(tmp & CameraTrackingTargetData::all().bits())
7643                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
7644                    flag_type: "CameraTrackingTargetData",
7645                    value: tmp as u32,
7646                })?;
7647        __struct.camera_device_id = buf.get_u8();
7648        Ok(__struct)
7649    }
7650    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7651        let mut __tmp = BytesMut::new(bytes);
7652        #[allow(clippy::absurd_extreme_comparisons)]
7653        #[allow(unused_comparisons)]
7654        if __tmp.remaining() < Self::ENCODED_LEN {
7655            panic!(
7656                "buffer is too small (need {} bytes, but got {})",
7657                Self::ENCODED_LEN,
7658                __tmp.remaining(),
7659            )
7660        }
7661        __tmp.put_f32_le(self.point_x);
7662        __tmp.put_f32_le(self.point_y);
7663        __tmp.put_f32_le(self.radius);
7664        __tmp.put_f32_le(self.rec_top_x);
7665        __tmp.put_f32_le(self.rec_top_y);
7666        __tmp.put_f32_le(self.rec_bottom_x);
7667        __tmp.put_f32_le(self.rec_bottom_y);
7668        __tmp.put_u8(self.tracking_status as u8);
7669        __tmp.put_u8(self.tracking_mode as u8);
7670        __tmp.put_u8(self.target_data.bits());
7671        __tmp.put_u8(self.camera_device_id);
7672        if matches!(version, MavlinkVersion::V2) {
7673            let len = __tmp.len();
7674            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7675        } else {
7676            __tmp.len()
7677        }
7678    }
7679}
7680#[doc = "id: 112"]
7681#[doc = "Camera-IMU triggering and synchronisation message."]
7682#[derive(Debug, Clone, PartialEq)]
7683#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7684#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7685pub struct CAMERA_TRIGGER_DATA {
7686    #[doc = "Timestamp for image frame (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
7687    pub time_usec: u64,
7688    #[doc = "Image frame sequence"]
7689    pub seq: u32,
7690}
7691impl CAMERA_TRIGGER_DATA {
7692    pub const ENCODED_LEN: usize = 12usize;
7693    pub const DEFAULT: Self = Self {
7694        time_usec: 0_u64,
7695        seq: 0_u32,
7696    };
7697    #[cfg(feature = "arbitrary")]
7698    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7699        use arbitrary::{Arbitrary, Unstructured};
7700        let mut buf = [0u8; 1024];
7701        rng.fill_bytes(&mut buf);
7702        let mut unstructured = Unstructured::new(&buf);
7703        Self::arbitrary(&mut unstructured).unwrap_or_default()
7704    }
7705}
7706impl Default for CAMERA_TRIGGER_DATA {
7707    fn default() -> Self {
7708        Self::DEFAULT.clone()
7709    }
7710}
7711impl MessageData for CAMERA_TRIGGER_DATA {
7712    type Message = MavMessage;
7713    const ID: u32 = 112u32;
7714    const NAME: &'static str = "CAMERA_TRIGGER";
7715    const EXTRA_CRC: u8 = 174u8;
7716    const ENCODED_LEN: usize = 12usize;
7717    fn deser(
7718        _version: MavlinkVersion,
7719        __input: &[u8],
7720    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7721        let avail_len = __input.len();
7722        let mut payload_buf = [0; Self::ENCODED_LEN];
7723        let mut buf = if avail_len < Self::ENCODED_LEN {
7724            payload_buf[0..avail_len].copy_from_slice(__input);
7725            Bytes::new(&payload_buf)
7726        } else {
7727            Bytes::new(__input)
7728        };
7729        let mut __struct = Self::default();
7730        __struct.time_usec = buf.get_u64_le();
7731        __struct.seq = buf.get_u32_le();
7732        Ok(__struct)
7733    }
7734    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7735        let mut __tmp = BytesMut::new(bytes);
7736        #[allow(clippy::absurd_extreme_comparisons)]
7737        #[allow(unused_comparisons)]
7738        if __tmp.remaining() < Self::ENCODED_LEN {
7739            panic!(
7740                "buffer is too small (need {} bytes, but got {})",
7741                Self::ENCODED_LEN,
7742                __tmp.remaining(),
7743            )
7744        }
7745        __tmp.put_u64_le(self.time_usec);
7746        __tmp.put_u32_le(self.seq);
7747        if matches!(version, MavlinkVersion::V2) {
7748            let len = __tmp.len();
7749            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7750        } else {
7751            __tmp.len()
7752        }
7753    }
7754}
7755#[doc = "id: 387"]
7756#[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
7757#[derive(Debug, Clone, PartialEq)]
7758#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7759#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7760pub struct CANFD_FRAME_DATA {
7761    #[doc = "Frame ID"]
7762    pub id: u32,
7763    #[doc = "System ID."]
7764    pub target_system: u8,
7765    #[doc = "Component ID."]
7766    pub target_component: u8,
7767    #[doc = "bus number"]
7768    pub bus: u8,
7769    #[doc = "Frame length"]
7770    pub len: u8,
7771    #[doc = "Frame data"]
7772    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7773    pub data: [u8; 64],
7774}
7775impl CANFD_FRAME_DATA {
7776    pub const ENCODED_LEN: usize = 72usize;
7777    pub const DEFAULT: Self = Self {
7778        id: 0_u32,
7779        target_system: 0_u8,
7780        target_component: 0_u8,
7781        bus: 0_u8,
7782        len: 0_u8,
7783        data: [0_u8; 64usize],
7784    };
7785    #[cfg(feature = "arbitrary")]
7786    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7787        use arbitrary::{Arbitrary, Unstructured};
7788        let mut buf = [0u8; 1024];
7789        rng.fill_bytes(&mut buf);
7790        let mut unstructured = Unstructured::new(&buf);
7791        Self::arbitrary(&mut unstructured).unwrap_or_default()
7792    }
7793}
7794impl Default for CANFD_FRAME_DATA {
7795    fn default() -> Self {
7796        Self::DEFAULT.clone()
7797    }
7798}
7799impl MessageData for CANFD_FRAME_DATA {
7800    type Message = MavMessage;
7801    const ID: u32 = 387u32;
7802    const NAME: &'static str = "CANFD_FRAME";
7803    const EXTRA_CRC: u8 = 4u8;
7804    const ENCODED_LEN: usize = 72usize;
7805    fn deser(
7806        _version: MavlinkVersion,
7807        __input: &[u8],
7808    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7809        let avail_len = __input.len();
7810        let mut payload_buf = [0; Self::ENCODED_LEN];
7811        let mut buf = if avail_len < Self::ENCODED_LEN {
7812            payload_buf[0..avail_len].copy_from_slice(__input);
7813            Bytes::new(&payload_buf)
7814        } else {
7815            Bytes::new(__input)
7816        };
7817        let mut __struct = Self::default();
7818        __struct.id = buf.get_u32_le();
7819        __struct.target_system = buf.get_u8();
7820        __struct.target_component = buf.get_u8();
7821        __struct.bus = buf.get_u8();
7822        __struct.len = buf.get_u8();
7823        for v in &mut __struct.data {
7824            let val = buf.get_u8();
7825            *v = val;
7826        }
7827        Ok(__struct)
7828    }
7829    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7830        let mut __tmp = BytesMut::new(bytes);
7831        #[allow(clippy::absurd_extreme_comparisons)]
7832        #[allow(unused_comparisons)]
7833        if __tmp.remaining() < Self::ENCODED_LEN {
7834            panic!(
7835                "buffer is too small (need {} bytes, but got {})",
7836                Self::ENCODED_LEN,
7837                __tmp.remaining(),
7838            )
7839        }
7840        __tmp.put_u32_le(self.id);
7841        __tmp.put_u8(self.target_system);
7842        __tmp.put_u8(self.target_component);
7843        __tmp.put_u8(self.bus);
7844        __tmp.put_u8(self.len);
7845        for val in &self.data {
7846            __tmp.put_u8(*val);
7847        }
7848        if matches!(version, MavlinkVersion::V2) {
7849            let len = __tmp.len();
7850            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7851        } else {
7852            __tmp.len()
7853        }
7854    }
7855}
7856#[doc = "id: 388"]
7857#[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
7858#[derive(Debug, Clone, PartialEq)]
7859#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7860#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7861pub struct CAN_FILTER_MODIFY_DATA {
7862    #[doc = "filter IDs, length num_ids"]
7863    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7864    pub ids: [u16; 16],
7865    #[doc = "System ID."]
7866    pub target_system: u8,
7867    #[doc = "Component ID."]
7868    pub target_component: u8,
7869    #[doc = "bus number"]
7870    pub bus: u8,
7871    #[doc = "what operation to perform on the filter list. See CAN_FILTER_OP enum."]
7872    pub operation: CanFilterOp,
7873    #[doc = "number of IDs in filter list"]
7874    pub num_ids: u8,
7875}
7876impl CAN_FILTER_MODIFY_DATA {
7877    pub const ENCODED_LEN: usize = 37usize;
7878    pub const DEFAULT: Self = Self {
7879        ids: [0_u16; 16usize],
7880        target_system: 0_u8,
7881        target_component: 0_u8,
7882        bus: 0_u8,
7883        operation: CanFilterOp::DEFAULT,
7884        num_ids: 0_u8,
7885    };
7886    #[cfg(feature = "arbitrary")]
7887    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7888        use arbitrary::{Arbitrary, Unstructured};
7889        let mut buf = [0u8; 1024];
7890        rng.fill_bytes(&mut buf);
7891        let mut unstructured = Unstructured::new(&buf);
7892        Self::arbitrary(&mut unstructured).unwrap_or_default()
7893    }
7894}
7895impl Default for CAN_FILTER_MODIFY_DATA {
7896    fn default() -> Self {
7897        Self::DEFAULT.clone()
7898    }
7899}
7900impl MessageData for CAN_FILTER_MODIFY_DATA {
7901    type Message = MavMessage;
7902    const ID: u32 = 388u32;
7903    const NAME: &'static str = "CAN_FILTER_MODIFY";
7904    const EXTRA_CRC: u8 = 8u8;
7905    const ENCODED_LEN: usize = 37usize;
7906    fn deser(
7907        _version: MavlinkVersion,
7908        __input: &[u8],
7909    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7910        let avail_len = __input.len();
7911        let mut payload_buf = [0; Self::ENCODED_LEN];
7912        let mut buf = if avail_len < Self::ENCODED_LEN {
7913            payload_buf[0..avail_len].copy_from_slice(__input);
7914            Bytes::new(&payload_buf)
7915        } else {
7916            Bytes::new(__input)
7917        };
7918        let mut __struct = Self::default();
7919        for v in &mut __struct.ids {
7920            let val = buf.get_u16_le();
7921            *v = val;
7922        }
7923        __struct.target_system = buf.get_u8();
7924        __struct.target_component = buf.get_u8();
7925        __struct.bus = buf.get_u8();
7926        let tmp = buf.get_u8();
7927        __struct.operation =
7928            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7929                enum_type: "CanFilterOp",
7930                value: tmp as u32,
7931            })?;
7932        __struct.num_ids = buf.get_u8();
7933        Ok(__struct)
7934    }
7935    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7936        let mut __tmp = BytesMut::new(bytes);
7937        #[allow(clippy::absurd_extreme_comparisons)]
7938        #[allow(unused_comparisons)]
7939        if __tmp.remaining() < Self::ENCODED_LEN {
7940            panic!(
7941                "buffer is too small (need {} bytes, but got {})",
7942                Self::ENCODED_LEN,
7943                __tmp.remaining(),
7944            )
7945        }
7946        for val in &self.ids {
7947            __tmp.put_u16_le(*val);
7948        }
7949        __tmp.put_u8(self.target_system);
7950        __tmp.put_u8(self.target_component);
7951        __tmp.put_u8(self.bus);
7952        __tmp.put_u8(self.operation as u8);
7953        __tmp.put_u8(self.num_ids);
7954        if matches!(version, MavlinkVersion::V2) {
7955            let len = __tmp.len();
7956            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7957        } else {
7958            __tmp.len()
7959        }
7960    }
7961}
7962#[doc = "id: 386"]
7963#[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
7964#[derive(Debug, Clone, PartialEq)]
7965#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7966#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7967pub struct CAN_FRAME_DATA {
7968    #[doc = "Frame ID"]
7969    pub id: u32,
7970    #[doc = "System ID."]
7971    pub target_system: u8,
7972    #[doc = "Component ID."]
7973    pub target_component: u8,
7974    #[doc = "Bus number"]
7975    pub bus: u8,
7976    #[doc = "Frame length"]
7977    pub len: u8,
7978    #[doc = "Frame data"]
7979    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7980    pub data: [u8; 8],
7981}
7982impl CAN_FRAME_DATA {
7983    pub const ENCODED_LEN: usize = 16usize;
7984    pub const DEFAULT: Self = Self {
7985        id: 0_u32,
7986        target_system: 0_u8,
7987        target_component: 0_u8,
7988        bus: 0_u8,
7989        len: 0_u8,
7990        data: [0_u8; 8usize],
7991    };
7992    #[cfg(feature = "arbitrary")]
7993    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7994        use arbitrary::{Arbitrary, Unstructured};
7995        let mut buf = [0u8; 1024];
7996        rng.fill_bytes(&mut buf);
7997        let mut unstructured = Unstructured::new(&buf);
7998        Self::arbitrary(&mut unstructured).unwrap_or_default()
7999    }
8000}
8001impl Default for CAN_FRAME_DATA {
8002    fn default() -> Self {
8003        Self::DEFAULT.clone()
8004    }
8005}
8006impl MessageData for CAN_FRAME_DATA {
8007    type Message = MavMessage;
8008    const ID: u32 = 386u32;
8009    const NAME: &'static str = "CAN_FRAME";
8010    const EXTRA_CRC: u8 = 132u8;
8011    const ENCODED_LEN: usize = 16usize;
8012    fn deser(
8013        _version: MavlinkVersion,
8014        __input: &[u8],
8015    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8016        let avail_len = __input.len();
8017        let mut payload_buf = [0; Self::ENCODED_LEN];
8018        let mut buf = if avail_len < Self::ENCODED_LEN {
8019            payload_buf[0..avail_len].copy_from_slice(__input);
8020            Bytes::new(&payload_buf)
8021        } else {
8022            Bytes::new(__input)
8023        };
8024        let mut __struct = Self::default();
8025        __struct.id = buf.get_u32_le();
8026        __struct.target_system = buf.get_u8();
8027        __struct.target_component = buf.get_u8();
8028        __struct.bus = buf.get_u8();
8029        __struct.len = buf.get_u8();
8030        for v in &mut __struct.data {
8031            let val = buf.get_u8();
8032            *v = val;
8033        }
8034        Ok(__struct)
8035    }
8036    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8037        let mut __tmp = BytesMut::new(bytes);
8038        #[allow(clippy::absurd_extreme_comparisons)]
8039        #[allow(unused_comparisons)]
8040        if __tmp.remaining() < Self::ENCODED_LEN {
8041            panic!(
8042                "buffer is too small (need {} bytes, but got {})",
8043                Self::ENCODED_LEN,
8044                __tmp.remaining(),
8045            )
8046        }
8047        __tmp.put_u32_le(self.id);
8048        __tmp.put_u8(self.target_system);
8049        __tmp.put_u8(self.target_component);
8050        __tmp.put_u8(self.bus);
8051        __tmp.put_u8(self.len);
8052        for val in &self.data {
8053            __tmp.put_u8(*val);
8054        }
8055        if matches!(version, MavlinkVersion::V2) {
8056            let len = __tmp.len();
8057            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8058        } else {
8059            __tmp.len()
8060        }
8061    }
8062}
8063#[doc = "id: 336"]
8064#[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
8065#[derive(Debug, Clone, PartialEq)]
8066#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8067#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8068pub struct CELLULAR_CONFIG_DATA {
8069    #[doc = "Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8070    pub enable_lte: u8,
8071    #[doc = "Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8072    pub enable_pin: u8,
8073    #[doc = "PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response."]
8074    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8075    pub pin: [u8; 16],
8076    #[doc = "New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response."]
8077    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8078    pub new_pin: [u8; 16],
8079    #[doc = "Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response."]
8080    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8081    pub apn: [u8; 32],
8082    #[doc = "Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response."]
8083    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8084    pub puk: [u8; 16],
8085    #[doc = "Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8086    pub roaming: u8,
8087    #[doc = "Message acceptance response (sent back to GS)."]
8088    pub response: CellularConfigResponse,
8089}
8090impl CELLULAR_CONFIG_DATA {
8091    pub const ENCODED_LEN: usize = 84usize;
8092    pub const DEFAULT: Self = Self {
8093        enable_lte: 0_u8,
8094        enable_pin: 0_u8,
8095        pin: [0_u8; 16usize],
8096        new_pin: [0_u8; 16usize],
8097        apn: [0_u8; 32usize],
8098        puk: [0_u8; 16usize],
8099        roaming: 0_u8,
8100        response: CellularConfigResponse::DEFAULT,
8101    };
8102    #[cfg(feature = "arbitrary")]
8103    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8104        use arbitrary::{Arbitrary, Unstructured};
8105        let mut buf = [0u8; 1024];
8106        rng.fill_bytes(&mut buf);
8107        let mut unstructured = Unstructured::new(&buf);
8108        Self::arbitrary(&mut unstructured).unwrap_or_default()
8109    }
8110}
8111impl Default for CELLULAR_CONFIG_DATA {
8112    fn default() -> Self {
8113        Self::DEFAULT.clone()
8114    }
8115}
8116impl MessageData for CELLULAR_CONFIG_DATA {
8117    type Message = MavMessage;
8118    const ID: u32 = 336u32;
8119    const NAME: &'static str = "CELLULAR_CONFIG";
8120    const EXTRA_CRC: u8 = 245u8;
8121    const ENCODED_LEN: usize = 84usize;
8122    fn deser(
8123        _version: MavlinkVersion,
8124        __input: &[u8],
8125    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8126        let avail_len = __input.len();
8127        let mut payload_buf = [0; Self::ENCODED_LEN];
8128        let mut buf = if avail_len < Self::ENCODED_LEN {
8129            payload_buf[0..avail_len].copy_from_slice(__input);
8130            Bytes::new(&payload_buf)
8131        } else {
8132            Bytes::new(__input)
8133        };
8134        let mut __struct = Self::default();
8135        __struct.enable_lte = buf.get_u8();
8136        __struct.enable_pin = buf.get_u8();
8137        for v in &mut __struct.pin {
8138            let val = buf.get_u8();
8139            *v = val;
8140        }
8141        for v in &mut __struct.new_pin {
8142            let val = buf.get_u8();
8143            *v = val;
8144        }
8145        for v in &mut __struct.apn {
8146            let val = buf.get_u8();
8147            *v = val;
8148        }
8149        for v in &mut __struct.puk {
8150            let val = buf.get_u8();
8151            *v = val;
8152        }
8153        __struct.roaming = buf.get_u8();
8154        let tmp = buf.get_u8();
8155        __struct.response =
8156            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8157                enum_type: "CellularConfigResponse",
8158                value: tmp as u32,
8159            })?;
8160        Ok(__struct)
8161    }
8162    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8163        let mut __tmp = BytesMut::new(bytes);
8164        #[allow(clippy::absurd_extreme_comparisons)]
8165        #[allow(unused_comparisons)]
8166        if __tmp.remaining() < Self::ENCODED_LEN {
8167            panic!(
8168                "buffer is too small (need {} bytes, but got {})",
8169                Self::ENCODED_LEN,
8170                __tmp.remaining(),
8171            )
8172        }
8173        __tmp.put_u8(self.enable_lte);
8174        __tmp.put_u8(self.enable_pin);
8175        for val in &self.pin {
8176            __tmp.put_u8(*val);
8177        }
8178        for val in &self.new_pin {
8179            __tmp.put_u8(*val);
8180        }
8181        for val in &self.apn {
8182            __tmp.put_u8(*val);
8183        }
8184        for val in &self.puk {
8185            __tmp.put_u8(*val);
8186        }
8187        __tmp.put_u8(self.roaming);
8188        __tmp.put_u8(self.response as u8);
8189        if matches!(version, MavlinkVersion::V2) {
8190            let len = __tmp.len();
8191            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8192        } else {
8193            __tmp.len()
8194        }
8195    }
8196}
8197#[doc = "id: 334"]
8198#[doc = "Report current used cellular network status."]
8199#[derive(Debug, Clone, PartialEq)]
8200#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8201#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8202pub struct CELLULAR_STATUS_DATA {
8203    #[doc = "Mobile country code. If unknown, set to UINT16_MAX"]
8204    pub mcc: u16,
8205    #[doc = "Mobile network code. If unknown, set to UINT16_MAX"]
8206    pub mnc: u16,
8207    #[doc = "Location area code. If unknown, set to 0"]
8208    pub lac: u16,
8209    #[doc = "Cellular modem status"]
8210    pub status: CellularStatusFlag,
8211    #[doc = "Failure reason when status in in CELLULAR_STATUS_FLAG_FAILED"]
8212    pub failure_reason: CellularNetworkFailedReason,
8213    #[doc = "Cellular network radio type: gsm, cdma, lte..."]
8214    pub mavtype: CellularNetworkRadioType,
8215    #[doc = "Signal quality in percent. If unknown, set to UINT8_MAX"]
8216    pub quality: u8,
8217}
8218impl CELLULAR_STATUS_DATA {
8219    pub const ENCODED_LEN: usize = 10usize;
8220    pub const DEFAULT: Self = Self {
8221        mcc: 0_u16,
8222        mnc: 0_u16,
8223        lac: 0_u16,
8224        status: CellularStatusFlag::DEFAULT,
8225        failure_reason: CellularNetworkFailedReason::DEFAULT,
8226        mavtype: CellularNetworkRadioType::DEFAULT,
8227        quality: 0_u8,
8228    };
8229    #[cfg(feature = "arbitrary")]
8230    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8231        use arbitrary::{Arbitrary, Unstructured};
8232        let mut buf = [0u8; 1024];
8233        rng.fill_bytes(&mut buf);
8234        let mut unstructured = Unstructured::new(&buf);
8235        Self::arbitrary(&mut unstructured).unwrap_or_default()
8236    }
8237}
8238impl Default for CELLULAR_STATUS_DATA {
8239    fn default() -> Self {
8240        Self::DEFAULT.clone()
8241    }
8242}
8243impl MessageData for CELLULAR_STATUS_DATA {
8244    type Message = MavMessage;
8245    const ID: u32 = 334u32;
8246    const NAME: &'static str = "CELLULAR_STATUS";
8247    const EXTRA_CRC: u8 = 72u8;
8248    const ENCODED_LEN: usize = 10usize;
8249    fn deser(
8250        _version: MavlinkVersion,
8251        __input: &[u8],
8252    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8253        let avail_len = __input.len();
8254        let mut payload_buf = [0; Self::ENCODED_LEN];
8255        let mut buf = if avail_len < Self::ENCODED_LEN {
8256            payload_buf[0..avail_len].copy_from_slice(__input);
8257            Bytes::new(&payload_buf)
8258        } else {
8259            Bytes::new(__input)
8260        };
8261        let mut __struct = Self::default();
8262        __struct.mcc = buf.get_u16_le();
8263        __struct.mnc = buf.get_u16_le();
8264        __struct.lac = buf.get_u16_le();
8265        let tmp = buf.get_u8();
8266        __struct.status =
8267            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8268                enum_type: "CellularStatusFlag",
8269                value: tmp as u32,
8270            })?;
8271        let tmp = buf.get_u8();
8272        __struct.failure_reason =
8273            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8274                enum_type: "CellularNetworkFailedReason",
8275                value: tmp as u32,
8276            })?;
8277        let tmp = buf.get_u8();
8278        __struct.mavtype =
8279            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8280                enum_type: "CellularNetworkRadioType",
8281                value: tmp as u32,
8282            })?;
8283        __struct.quality = buf.get_u8();
8284        Ok(__struct)
8285    }
8286    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8287        let mut __tmp = BytesMut::new(bytes);
8288        #[allow(clippy::absurd_extreme_comparisons)]
8289        #[allow(unused_comparisons)]
8290        if __tmp.remaining() < Self::ENCODED_LEN {
8291            panic!(
8292                "buffer is too small (need {} bytes, but got {})",
8293                Self::ENCODED_LEN,
8294                __tmp.remaining(),
8295            )
8296        }
8297        __tmp.put_u16_le(self.mcc);
8298        __tmp.put_u16_le(self.mnc);
8299        __tmp.put_u16_le(self.lac);
8300        __tmp.put_u8(self.status as u8);
8301        __tmp.put_u8(self.failure_reason as u8);
8302        __tmp.put_u8(self.mavtype as u8);
8303        __tmp.put_u8(self.quality);
8304        if matches!(version, MavlinkVersion::V2) {
8305            let len = __tmp.len();
8306            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8307        } else {
8308            __tmp.len()
8309        }
8310    }
8311}
8312#[doc = "id: 5"]
8313#[doc = "Request to control this MAV."]
8314#[derive(Debug, Clone, PartialEq)]
8315#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8316#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8317pub struct CHANGE_OPERATOR_CONTROL_DATA {
8318    #[doc = "System the GCS requests control for"]
8319    pub target_system: u8,
8320    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
8321    pub control_request: u8,
8322    #[doc = "0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch."]
8323    pub version: u8,
8324    #[doc = "Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and \"!?,.-\""]
8325    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8326    pub passkey: [u8; 25],
8327}
8328impl CHANGE_OPERATOR_CONTROL_DATA {
8329    pub const ENCODED_LEN: usize = 28usize;
8330    pub const DEFAULT: Self = Self {
8331        target_system: 0_u8,
8332        control_request: 0_u8,
8333        version: 0_u8,
8334        passkey: [0_u8; 25usize],
8335    };
8336    #[cfg(feature = "arbitrary")]
8337    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8338        use arbitrary::{Arbitrary, Unstructured};
8339        let mut buf = [0u8; 1024];
8340        rng.fill_bytes(&mut buf);
8341        let mut unstructured = Unstructured::new(&buf);
8342        Self::arbitrary(&mut unstructured).unwrap_or_default()
8343    }
8344}
8345impl Default for CHANGE_OPERATOR_CONTROL_DATA {
8346    fn default() -> Self {
8347        Self::DEFAULT.clone()
8348    }
8349}
8350impl MessageData for CHANGE_OPERATOR_CONTROL_DATA {
8351    type Message = MavMessage;
8352    const ID: u32 = 5u32;
8353    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL";
8354    const EXTRA_CRC: u8 = 217u8;
8355    const ENCODED_LEN: usize = 28usize;
8356    fn deser(
8357        _version: MavlinkVersion,
8358        __input: &[u8],
8359    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8360        let avail_len = __input.len();
8361        let mut payload_buf = [0; Self::ENCODED_LEN];
8362        let mut buf = if avail_len < Self::ENCODED_LEN {
8363            payload_buf[0..avail_len].copy_from_slice(__input);
8364            Bytes::new(&payload_buf)
8365        } else {
8366            Bytes::new(__input)
8367        };
8368        let mut __struct = Self::default();
8369        __struct.target_system = buf.get_u8();
8370        __struct.control_request = buf.get_u8();
8371        __struct.version = buf.get_u8();
8372        for v in &mut __struct.passkey {
8373            let val = buf.get_u8();
8374            *v = val;
8375        }
8376        Ok(__struct)
8377    }
8378    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8379        let mut __tmp = BytesMut::new(bytes);
8380        #[allow(clippy::absurd_extreme_comparisons)]
8381        #[allow(unused_comparisons)]
8382        if __tmp.remaining() < Self::ENCODED_LEN {
8383            panic!(
8384                "buffer is too small (need {} bytes, but got {})",
8385                Self::ENCODED_LEN,
8386                __tmp.remaining(),
8387            )
8388        }
8389        __tmp.put_u8(self.target_system);
8390        __tmp.put_u8(self.control_request);
8391        __tmp.put_u8(self.version);
8392        for val in &self.passkey {
8393            __tmp.put_u8(*val);
8394        }
8395        if matches!(version, MavlinkVersion::V2) {
8396            let len = __tmp.len();
8397            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8398        } else {
8399            __tmp.len()
8400        }
8401    }
8402}
8403#[doc = "id: 6"]
8404#[doc = "Accept / deny control of this MAV."]
8405#[derive(Debug, Clone, PartialEq)]
8406#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8407#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8408pub struct CHANGE_OPERATOR_CONTROL_ACK_DATA {
8409    #[doc = "ID of the GCS this message"]
8410    pub gcs_system_id: u8,
8411    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
8412    pub control_request: u8,
8413    #[doc = "0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control"]
8414    pub ack: u8,
8415}
8416impl CHANGE_OPERATOR_CONTROL_ACK_DATA {
8417    pub const ENCODED_LEN: usize = 3usize;
8418    pub const DEFAULT: Self = Self {
8419        gcs_system_id: 0_u8,
8420        control_request: 0_u8,
8421        ack: 0_u8,
8422    };
8423    #[cfg(feature = "arbitrary")]
8424    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8425        use arbitrary::{Arbitrary, Unstructured};
8426        let mut buf = [0u8; 1024];
8427        rng.fill_bytes(&mut buf);
8428        let mut unstructured = Unstructured::new(&buf);
8429        Self::arbitrary(&mut unstructured).unwrap_or_default()
8430    }
8431}
8432impl Default for CHANGE_OPERATOR_CONTROL_ACK_DATA {
8433    fn default() -> Self {
8434        Self::DEFAULT.clone()
8435    }
8436}
8437impl MessageData for CHANGE_OPERATOR_CONTROL_ACK_DATA {
8438    type Message = MavMessage;
8439    const ID: u32 = 6u32;
8440    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL_ACK";
8441    const EXTRA_CRC: u8 = 104u8;
8442    const ENCODED_LEN: usize = 3usize;
8443    fn deser(
8444        _version: MavlinkVersion,
8445        __input: &[u8],
8446    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8447        let avail_len = __input.len();
8448        let mut payload_buf = [0; Self::ENCODED_LEN];
8449        let mut buf = if avail_len < Self::ENCODED_LEN {
8450            payload_buf[0..avail_len].copy_from_slice(__input);
8451            Bytes::new(&payload_buf)
8452        } else {
8453            Bytes::new(__input)
8454        };
8455        let mut __struct = Self::default();
8456        __struct.gcs_system_id = buf.get_u8();
8457        __struct.control_request = buf.get_u8();
8458        __struct.ack = buf.get_u8();
8459        Ok(__struct)
8460    }
8461    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8462        let mut __tmp = BytesMut::new(bytes);
8463        #[allow(clippy::absurd_extreme_comparisons)]
8464        #[allow(unused_comparisons)]
8465        if __tmp.remaining() < Self::ENCODED_LEN {
8466            panic!(
8467                "buffer is too small (need {} bytes, but got {})",
8468                Self::ENCODED_LEN,
8469                __tmp.remaining(),
8470            )
8471        }
8472        __tmp.put_u8(self.gcs_system_id);
8473        __tmp.put_u8(self.control_request);
8474        __tmp.put_u8(self.ack);
8475        if matches!(version, MavlinkVersion::V2) {
8476            let len = __tmp.len();
8477            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8478        } else {
8479            __tmp.len()
8480        }
8481    }
8482}
8483#[doc = "id: 247"]
8484#[doc = "Information about a potential collision."]
8485#[derive(Debug, Clone, PartialEq)]
8486#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8487#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8488pub struct COLLISION_DATA {
8489    #[doc = "Unique identifier, domain based on src field"]
8490    pub id: u32,
8491    #[doc = "Estimated time until collision occurs"]
8492    pub time_to_minimum_delta: f32,
8493    #[doc = "Closest vertical distance between vehicle and object"]
8494    pub altitude_minimum_delta: f32,
8495    #[doc = "Closest horizontal distance between vehicle and object"]
8496    pub horizontal_minimum_delta: f32,
8497    #[doc = "Collision data source"]
8498    pub src: MavCollisionSrc,
8499    #[doc = "Action that is being taken to avoid this collision"]
8500    pub action: MavCollisionAction,
8501    #[doc = "How concerned the aircraft is about this collision"]
8502    pub threat_level: MavCollisionThreatLevel,
8503}
8504impl COLLISION_DATA {
8505    pub const ENCODED_LEN: usize = 19usize;
8506    pub const DEFAULT: Self = Self {
8507        id: 0_u32,
8508        time_to_minimum_delta: 0.0_f32,
8509        altitude_minimum_delta: 0.0_f32,
8510        horizontal_minimum_delta: 0.0_f32,
8511        src: MavCollisionSrc::DEFAULT,
8512        action: MavCollisionAction::DEFAULT,
8513        threat_level: MavCollisionThreatLevel::DEFAULT,
8514    };
8515    #[cfg(feature = "arbitrary")]
8516    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8517        use arbitrary::{Arbitrary, Unstructured};
8518        let mut buf = [0u8; 1024];
8519        rng.fill_bytes(&mut buf);
8520        let mut unstructured = Unstructured::new(&buf);
8521        Self::arbitrary(&mut unstructured).unwrap_or_default()
8522    }
8523}
8524impl Default for COLLISION_DATA {
8525    fn default() -> Self {
8526        Self::DEFAULT.clone()
8527    }
8528}
8529impl MessageData for COLLISION_DATA {
8530    type Message = MavMessage;
8531    const ID: u32 = 247u32;
8532    const NAME: &'static str = "COLLISION";
8533    const EXTRA_CRC: u8 = 81u8;
8534    const ENCODED_LEN: usize = 19usize;
8535    fn deser(
8536        _version: MavlinkVersion,
8537        __input: &[u8],
8538    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8539        let avail_len = __input.len();
8540        let mut payload_buf = [0; Self::ENCODED_LEN];
8541        let mut buf = if avail_len < Self::ENCODED_LEN {
8542            payload_buf[0..avail_len].copy_from_slice(__input);
8543            Bytes::new(&payload_buf)
8544        } else {
8545            Bytes::new(__input)
8546        };
8547        let mut __struct = Self::default();
8548        __struct.id = buf.get_u32_le();
8549        __struct.time_to_minimum_delta = buf.get_f32_le();
8550        __struct.altitude_minimum_delta = buf.get_f32_le();
8551        __struct.horizontal_minimum_delta = buf.get_f32_le();
8552        let tmp = buf.get_u8();
8553        __struct.src =
8554            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8555                enum_type: "MavCollisionSrc",
8556                value: tmp as u32,
8557            })?;
8558        let tmp = buf.get_u8();
8559        __struct.action =
8560            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8561                enum_type: "MavCollisionAction",
8562                value: tmp as u32,
8563            })?;
8564        let tmp = buf.get_u8();
8565        __struct.threat_level =
8566            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8567                enum_type: "MavCollisionThreatLevel",
8568                value: tmp as u32,
8569            })?;
8570        Ok(__struct)
8571    }
8572    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8573        let mut __tmp = BytesMut::new(bytes);
8574        #[allow(clippy::absurd_extreme_comparisons)]
8575        #[allow(unused_comparisons)]
8576        if __tmp.remaining() < Self::ENCODED_LEN {
8577            panic!(
8578                "buffer is too small (need {} bytes, but got {})",
8579                Self::ENCODED_LEN,
8580                __tmp.remaining(),
8581            )
8582        }
8583        __tmp.put_u32_le(self.id);
8584        __tmp.put_f32_le(self.time_to_minimum_delta);
8585        __tmp.put_f32_le(self.altitude_minimum_delta);
8586        __tmp.put_f32_le(self.horizontal_minimum_delta);
8587        __tmp.put_u8(self.src as u8);
8588        __tmp.put_u8(self.action as u8);
8589        __tmp.put_u8(self.threat_level as u8);
8590        if matches!(version, MavlinkVersion::V2) {
8591            let len = __tmp.len();
8592            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8593        } else {
8594            __tmp.len()
8595        }
8596    }
8597}
8598#[doc = "id: 77"]
8599#[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
8600#[derive(Debug, Clone, PartialEq)]
8601#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8602#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8603pub struct COMMAND_ACK_DATA {
8604    #[doc = "Command ID (of acknowledged command)."]
8605    pub command: MavCmd,
8606    #[doc = "Result of command."]
8607    pub result: MavResult,
8608    #[doc = "The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown."]
8609    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8610    pub progress: u8,
8611    #[doc = "Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate \"unused\" or \"unknown\")."]
8612    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8613    pub result_param2: i32,
8614    #[doc = "System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
8615    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8616    pub target_system: u8,
8617    #[doc = "Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
8618    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8619    pub target_component: u8,
8620}
8621impl COMMAND_ACK_DATA {
8622    pub const ENCODED_LEN: usize = 10usize;
8623    pub const DEFAULT: Self = Self {
8624        command: MavCmd::DEFAULT,
8625        result: MavResult::DEFAULT,
8626        progress: 0_u8,
8627        result_param2: 0_i32,
8628        target_system: 0_u8,
8629        target_component: 0_u8,
8630    };
8631    #[cfg(feature = "arbitrary")]
8632    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8633        use arbitrary::{Arbitrary, Unstructured};
8634        let mut buf = [0u8; 1024];
8635        rng.fill_bytes(&mut buf);
8636        let mut unstructured = Unstructured::new(&buf);
8637        Self::arbitrary(&mut unstructured).unwrap_or_default()
8638    }
8639}
8640impl Default for COMMAND_ACK_DATA {
8641    fn default() -> Self {
8642        Self::DEFAULT.clone()
8643    }
8644}
8645impl MessageData for COMMAND_ACK_DATA {
8646    type Message = MavMessage;
8647    const ID: u32 = 77u32;
8648    const NAME: &'static str = "COMMAND_ACK";
8649    const EXTRA_CRC: u8 = 143u8;
8650    const ENCODED_LEN: usize = 10usize;
8651    fn deser(
8652        _version: MavlinkVersion,
8653        __input: &[u8],
8654    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8655        let avail_len = __input.len();
8656        let mut payload_buf = [0; Self::ENCODED_LEN];
8657        let mut buf = if avail_len < Self::ENCODED_LEN {
8658            payload_buf[0..avail_len].copy_from_slice(__input);
8659            Bytes::new(&payload_buf)
8660        } else {
8661            Bytes::new(__input)
8662        };
8663        let mut __struct = Self::default();
8664        let tmp = buf.get_u16_le();
8665        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
8666            ::mavlink_core::error::ParserError::InvalidEnum {
8667                enum_type: "MavCmd",
8668                value: tmp as u32,
8669            },
8670        )?;
8671        let tmp = buf.get_u8();
8672        __struct.result =
8673            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8674                enum_type: "MavResult",
8675                value: tmp as u32,
8676            })?;
8677        __struct.progress = buf.get_u8();
8678        __struct.result_param2 = buf.get_i32_le();
8679        __struct.target_system = buf.get_u8();
8680        __struct.target_component = buf.get_u8();
8681        Ok(__struct)
8682    }
8683    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8684        let mut __tmp = BytesMut::new(bytes);
8685        #[allow(clippy::absurd_extreme_comparisons)]
8686        #[allow(unused_comparisons)]
8687        if __tmp.remaining() < Self::ENCODED_LEN {
8688            panic!(
8689                "buffer is too small (need {} bytes, but got {})",
8690                Self::ENCODED_LEN,
8691                __tmp.remaining(),
8692            )
8693        }
8694        __tmp.put_u16_le(self.command as u16);
8695        __tmp.put_u8(self.result as u8);
8696        __tmp.put_u8(self.progress);
8697        __tmp.put_i32_le(self.result_param2);
8698        __tmp.put_u8(self.target_system);
8699        __tmp.put_u8(self.target_component);
8700        if matches!(version, MavlinkVersion::V2) {
8701            let len = __tmp.len();
8702            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8703        } else {
8704            __tmp.len()
8705        }
8706    }
8707}
8708#[doc = "id: 80"]
8709#[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
8710#[derive(Debug, Clone, PartialEq)]
8711#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8712#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8713pub struct COMMAND_CANCEL_DATA {
8714    #[doc = "Command ID (of command to cancel)."]
8715    pub command: MavCmd,
8716    #[doc = "System executing long running command. Should not be broadcast (0)."]
8717    pub target_system: u8,
8718    #[doc = "Component executing long running command."]
8719    pub target_component: u8,
8720}
8721impl COMMAND_CANCEL_DATA {
8722    pub const ENCODED_LEN: usize = 4usize;
8723    pub const DEFAULT: Self = Self {
8724        command: MavCmd::DEFAULT,
8725        target_system: 0_u8,
8726        target_component: 0_u8,
8727    };
8728    #[cfg(feature = "arbitrary")]
8729    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8730        use arbitrary::{Arbitrary, Unstructured};
8731        let mut buf = [0u8; 1024];
8732        rng.fill_bytes(&mut buf);
8733        let mut unstructured = Unstructured::new(&buf);
8734        Self::arbitrary(&mut unstructured).unwrap_or_default()
8735    }
8736}
8737impl Default for COMMAND_CANCEL_DATA {
8738    fn default() -> Self {
8739        Self::DEFAULT.clone()
8740    }
8741}
8742impl MessageData for COMMAND_CANCEL_DATA {
8743    type Message = MavMessage;
8744    const ID: u32 = 80u32;
8745    const NAME: &'static str = "COMMAND_CANCEL";
8746    const EXTRA_CRC: u8 = 14u8;
8747    const ENCODED_LEN: usize = 4usize;
8748    fn deser(
8749        _version: MavlinkVersion,
8750        __input: &[u8],
8751    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8752        let avail_len = __input.len();
8753        let mut payload_buf = [0; Self::ENCODED_LEN];
8754        let mut buf = if avail_len < Self::ENCODED_LEN {
8755            payload_buf[0..avail_len].copy_from_slice(__input);
8756            Bytes::new(&payload_buf)
8757        } else {
8758            Bytes::new(__input)
8759        };
8760        let mut __struct = Self::default();
8761        let tmp = buf.get_u16_le();
8762        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
8763            ::mavlink_core::error::ParserError::InvalidEnum {
8764                enum_type: "MavCmd",
8765                value: tmp as u32,
8766            },
8767        )?;
8768        __struct.target_system = buf.get_u8();
8769        __struct.target_component = buf.get_u8();
8770        Ok(__struct)
8771    }
8772    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8773        let mut __tmp = BytesMut::new(bytes);
8774        #[allow(clippy::absurd_extreme_comparisons)]
8775        #[allow(unused_comparisons)]
8776        if __tmp.remaining() < Self::ENCODED_LEN {
8777            panic!(
8778                "buffer is too small (need {} bytes, but got {})",
8779                Self::ENCODED_LEN,
8780                __tmp.remaining(),
8781            )
8782        }
8783        __tmp.put_u16_le(self.command as u16);
8784        __tmp.put_u8(self.target_system);
8785        __tmp.put_u8(self.target_component);
8786        if matches!(version, MavlinkVersion::V2) {
8787            let len = __tmp.len();
8788            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8789        } else {
8790            __tmp.len()
8791        }
8792    }
8793}
8794#[doc = "id: 75"]
8795#[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
8796#[derive(Debug, Clone, PartialEq)]
8797#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8798#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8799pub struct COMMAND_INT_DATA {
8800    #[doc = "PARAM1, see MAV_CMD enum"]
8801    pub param1: f32,
8802    #[doc = "PARAM2, see MAV_CMD enum"]
8803    pub param2: f32,
8804    #[doc = "PARAM3, see MAV_CMD enum"]
8805    pub param3: f32,
8806    #[doc = "PARAM4, see MAV_CMD enum"]
8807    pub param4: f32,
8808    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
8809    pub x: i32,
8810    #[doc = "PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7"]
8811    pub y: i32,
8812    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame)."]
8813    pub z: f32,
8814    #[doc = "The scheduled action for the mission item."]
8815    pub command: MavCmd,
8816    #[doc = "System ID"]
8817    pub target_system: u8,
8818    #[doc = "Component ID"]
8819    pub target_component: u8,
8820    #[doc = "The coordinate system of the COMMAND."]
8821    pub frame: MavFrame,
8822    #[doc = "Not used."]
8823    pub current: u8,
8824    #[doc = "Not used (set 0)."]
8825    pub autocontinue: u8,
8826}
8827impl COMMAND_INT_DATA {
8828    pub const ENCODED_LEN: usize = 35usize;
8829    pub const DEFAULT: Self = Self {
8830        param1: 0.0_f32,
8831        param2: 0.0_f32,
8832        param3: 0.0_f32,
8833        param4: 0.0_f32,
8834        x: 0_i32,
8835        y: 0_i32,
8836        z: 0.0_f32,
8837        command: MavCmd::DEFAULT,
8838        target_system: 0_u8,
8839        target_component: 0_u8,
8840        frame: MavFrame::DEFAULT,
8841        current: 0_u8,
8842        autocontinue: 0_u8,
8843    };
8844    #[cfg(feature = "arbitrary")]
8845    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8846        use arbitrary::{Arbitrary, Unstructured};
8847        let mut buf = [0u8; 1024];
8848        rng.fill_bytes(&mut buf);
8849        let mut unstructured = Unstructured::new(&buf);
8850        Self::arbitrary(&mut unstructured).unwrap_or_default()
8851    }
8852}
8853impl Default for COMMAND_INT_DATA {
8854    fn default() -> Self {
8855        Self::DEFAULT.clone()
8856    }
8857}
8858impl MessageData for COMMAND_INT_DATA {
8859    type Message = MavMessage;
8860    const ID: u32 = 75u32;
8861    const NAME: &'static str = "COMMAND_INT";
8862    const EXTRA_CRC: u8 = 158u8;
8863    const ENCODED_LEN: usize = 35usize;
8864    fn deser(
8865        _version: MavlinkVersion,
8866        __input: &[u8],
8867    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8868        let avail_len = __input.len();
8869        let mut payload_buf = [0; Self::ENCODED_LEN];
8870        let mut buf = if avail_len < Self::ENCODED_LEN {
8871            payload_buf[0..avail_len].copy_from_slice(__input);
8872            Bytes::new(&payload_buf)
8873        } else {
8874            Bytes::new(__input)
8875        };
8876        let mut __struct = Self::default();
8877        __struct.param1 = buf.get_f32_le();
8878        __struct.param2 = buf.get_f32_le();
8879        __struct.param3 = buf.get_f32_le();
8880        __struct.param4 = buf.get_f32_le();
8881        __struct.x = buf.get_i32_le();
8882        __struct.y = buf.get_i32_le();
8883        __struct.z = buf.get_f32_le();
8884        let tmp = buf.get_u16_le();
8885        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
8886            ::mavlink_core::error::ParserError::InvalidEnum {
8887                enum_type: "MavCmd",
8888                value: tmp as u32,
8889            },
8890        )?;
8891        __struct.target_system = buf.get_u8();
8892        __struct.target_component = buf.get_u8();
8893        let tmp = buf.get_u8();
8894        __struct.frame =
8895            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8896                enum_type: "MavFrame",
8897                value: tmp as u32,
8898            })?;
8899        __struct.current = buf.get_u8();
8900        __struct.autocontinue = buf.get_u8();
8901        Ok(__struct)
8902    }
8903    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8904        let mut __tmp = BytesMut::new(bytes);
8905        #[allow(clippy::absurd_extreme_comparisons)]
8906        #[allow(unused_comparisons)]
8907        if __tmp.remaining() < Self::ENCODED_LEN {
8908            panic!(
8909                "buffer is too small (need {} bytes, but got {})",
8910                Self::ENCODED_LEN,
8911                __tmp.remaining(),
8912            )
8913        }
8914        __tmp.put_f32_le(self.param1);
8915        __tmp.put_f32_le(self.param2);
8916        __tmp.put_f32_le(self.param3);
8917        __tmp.put_f32_le(self.param4);
8918        __tmp.put_i32_le(self.x);
8919        __tmp.put_i32_le(self.y);
8920        __tmp.put_f32_le(self.z);
8921        __tmp.put_u16_le(self.command as u16);
8922        __tmp.put_u8(self.target_system);
8923        __tmp.put_u8(self.target_component);
8924        __tmp.put_u8(self.frame as u8);
8925        __tmp.put_u8(self.current);
8926        __tmp.put_u8(self.autocontinue);
8927        if matches!(version, MavlinkVersion::V2) {
8928            let len = __tmp.len();
8929            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8930        } else {
8931            __tmp.len()
8932        }
8933    }
8934}
8935#[doc = "id: 76"]
8936#[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
8937#[derive(Debug, Clone, PartialEq)]
8938#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8939#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8940pub struct COMMAND_LONG_DATA {
8941    #[doc = "Parameter 1 (for the specific command)."]
8942    pub param1: f32,
8943    #[doc = "Parameter 2 (for the specific command)."]
8944    pub param2: f32,
8945    #[doc = "Parameter 3 (for the specific command)."]
8946    pub param3: f32,
8947    #[doc = "Parameter 4 (for the specific command)."]
8948    pub param4: f32,
8949    #[doc = "Parameter 5 (for the specific command)."]
8950    pub param5: f32,
8951    #[doc = "Parameter 6 (for the specific command)."]
8952    pub param6: f32,
8953    #[doc = "Parameter 7 (for the specific command)."]
8954    pub param7: f32,
8955    #[doc = "Command ID (of command to send)."]
8956    pub command: MavCmd,
8957    #[doc = "System which should execute the command"]
8958    pub target_system: u8,
8959    #[doc = "Component which should execute the command, 0 for all components"]
8960    pub target_component: u8,
8961    #[doc = "0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)"]
8962    pub confirmation: u8,
8963}
8964impl COMMAND_LONG_DATA {
8965    pub const ENCODED_LEN: usize = 33usize;
8966    pub const DEFAULT: Self = Self {
8967        param1: 0.0_f32,
8968        param2: 0.0_f32,
8969        param3: 0.0_f32,
8970        param4: 0.0_f32,
8971        param5: 0.0_f32,
8972        param6: 0.0_f32,
8973        param7: 0.0_f32,
8974        command: MavCmd::DEFAULT,
8975        target_system: 0_u8,
8976        target_component: 0_u8,
8977        confirmation: 0_u8,
8978    };
8979    #[cfg(feature = "arbitrary")]
8980    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8981        use arbitrary::{Arbitrary, Unstructured};
8982        let mut buf = [0u8; 1024];
8983        rng.fill_bytes(&mut buf);
8984        let mut unstructured = Unstructured::new(&buf);
8985        Self::arbitrary(&mut unstructured).unwrap_or_default()
8986    }
8987}
8988impl Default for COMMAND_LONG_DATA {
8989    fn default() -> Self {
8990        Self::DEFAULT.clone()
8991    }
8992}
8993impl MessageData for COMMAND_LONG_DATA {
8994    type Message = MavMessage;
8995    const ID: u32 = 76u32;
8996    const NAME: &'static str = "COMMAND_LONG";
8997    const EXTRA_CRC: u8 = 152u8;
8998    const ENCODED_LEN: usize = 33usize;
8999    fn deser(
9000        _version: MavlinkVersion,
9001        __input: &[u8],
9002    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9003        let avail_len = __input.len();
9004        let mut payload_buf = [0; Self::ENCODED_LEN];
9005        let mut buf = if avail_len < Self::ENCODED_LEN {
9006            payload_buf[0..avail_len].copy_from_slice(__input);
9007            Bytes::new(&payload_buf)
9008        } else {
9009            Bytes::new(__input)
9010        };
9011        let mut __struct = Self::default();
9012        __struct.param1 = buf.get_f32_le();
9013        __struct.param2 = buf.get_f32_le();
9014        __struct.param3 = buf.get_f32_le();
9015        __struct.param4 = buf.get_f32_le();
9016        __struct.param5 = buf.get_f32_le();
9017        __struct.param6 = buf.get_f32_le();
9018        __struct.param7 = buf.get_f32_le();
9019        let tmp = buf.get_u16_le();
9020        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9021            ::mavlink_core::error::ParserError::InvalidEnum {
9022                enum_type: "MavCmd",
9023                value: tmp as u32,
9024            },
9025        )?;
9026        __struct.target_system = buf.get_u8();
9027        __struct.target_component = buf.get_u8();
9028        __struct.confirmation = buf.get_u8();
9029        Ok(__struct)
9030    }
9031    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9032        let mut __tmp = BytesMut::new(bytes);
9033        #[allow(clippy::absurd_extreme_comparisons)]
9034        #[allow(unused_comparisons)]
9035        if __tmp.remaining() < Self::ENCODED_LEN {
9036            panic!(
9037                "buffer is too small (need {} bytes, but got {})",
9038                Self::ENCODED_LEN,
9039                __tmp.remaining(),
9040            )
9041        }
9042        __tmp.put_f32_le(self.param1);
9043        __tmp.put_f32_le(self.param2);
9044        __tmp.put_f32_le(self.param3);
9045        __tmp.put_f32_le(self.param4);
9046        __tmp.put_f32_le(self.param5);
9047        __tmp.put_f32_le(self.param6);
9048        __tmp.put_f32_le(self.param7);
9049        __tmp.put_u16_le(self.command as u16);
9050        __tmp.put_u8(self.target_system);
9051        __tmp.put_u8(self.target_component);
9052        __tmp.put_u8(self.confirmation);
9053        if matches!(version, MavlinkVersion::V2) {
9054            let len = __tmp.len();
9055            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9056        } else {
9057            __tmp.len()
9058        }
9059    }
9060}
9061#[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
9062#[doc = "id: 395"]
9063#[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
9064#[derive(Debug, Clone, PartialEq)]
9065#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9066#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9067pub struct COMPONENT_INFORMATION_DATA {
9068    #[doc = "Timestamp (time since system boot)."]
9069    pub time_boot_ms: u32,
9070    #[doc = "CRC32 of the general metadata file (general_metadata_uri)."]
9071    pub general_metadata_file_crc: u32,
9072    #[doc = "CRC32 of peripherals metadata file (peripherals_metadata_uri)."]
9073    pub peripherals_metadata_file_crc: u32,
9074    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9075    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9076    pub general_metadata_uri: [u8; 100],
9077    #[doc = "(Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about \"attached components\" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated."]
9078    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9079    pub peripherals_metadata_uri: [u8; 100],
9080}
9081impl COMPONENT_INFORMATION_DATA {
9082    pub const ENCODED_LEN: usize = 212usize;
9083    pub const DEFAULT: Self = Self {
9084        time_boot_ms: 0_u32,
9085        general_metadata_file_crc: 0_u32,
9086        peripherals_metadata_file_crc: 0_u32,
9087        general_metadata_uri: [0_u8; 100usize],
9088        peripherals_metadata_uri: [0_u8; 100usize],
9089    };
9090    #[cfg(feature = "arbitrary")]
9091    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9092        use arbitrary::{Arbitrary, Unstructured};
9093        let mut buf = [0u8; 1024];
9094        rng.fill_bytes(&mut buf);
9095        let mut unstructured = Unstructured::new(&buf);
9096        Self::arbitrary(&mut unstructured).unwrap_or_default()
9097    }
9098}
9099impl Default for COMPONENT_INFORMATION_DATA {
9100    fn default() -> Self {
9101        Self::DEFAULT.clone()
9102    }
9103}
9104impl MessageData for COMPONENT_INFORMATION_DATA {
9105    type Message = MavMessage;
9106    const ID: u32 = 395u32;
9107    const NAME: &'static str = "COMPONENT_INFORMATION";
9108    const EXTRA_CRC: u8 = 0u8;
9109    const ENCODED_LEN: usize = 212usize;
9110    fn deser(
9111        _version: MavlinkVersion,
9112        __input: &[u8],
9113    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9114        let avail_len = __input.len();
9115        let mut payload_buf = [0; Self::ENCODED_LEN];
9116        let mut buf = if avail_len < Self::ENCODED_LEN {
9117            payload_buf[0..avail_len].copy_from_slice(__input);
9118            Bytes::new(&payload_buf)
9119        } else {
9120            Bytes::new(__input)
9121        };
9122        let mut __struct = Self::default();
9123        __struct.time_boot_ms = buf.get_u32_le();
9124        __struct.general_metadata_file_crc = buf.get_u32_le();
9125        __struct.peripherals_metadata_file_crc = buf.get_u32_le();
9126        for v in &mut __struct.general_metadata_uri {
9127            let val = buf.get_u8();
9128            *v = val;
9129        }
9130        for v in &mut __struct.peripherals_metadata_uri {
9131            let val = buf.get_u8();
9132            *v = val;
9133        }
9134        Ok(__struct)
9135    }
9136    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9137        let mut __tmp = BytesMut::new(bytes);
9138        #[allow(clippy::absurd_extreme_comparisons)]
9139        #[allow(unused_comparisons)]
9140        if __tmp.remaining() < Self::ENCODED_LEN {
9141            panic!(
9142                "buffer is too small (need {} bytes, but got {})",
9143                Self::ENCODED_LEN,
9144                __tmp.remaining(),
9145            )
9146        }
9147        __tmp.put_u32_le(self.time_boot_ms);
9148        __tmp.put_u32_le(self.general_metadata_file_crc);
9149        __tmp.put_u32_le(self.peripherals_metadata_file_crc);
9150        for val in &self.general_metadata_uri {
9151            __tmp.put_u8(*val);
9152        }
9153        for val in &self.peripherals_metadata_uri {
9154            __tmp.put_u8(*val);
9155        }
9156        if matches!(version, MavlinkVersion::V2) {
9157            let len = __tmp.len();
9158            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9159        } else {
9160            __tmp.len()
9161        }
9162    }
9163}
9164#[doc = "id: 396"]
9165#[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
9166#[derive(Debug, Clone, PartialEq)]
9167#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9168#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9169pub struct COMPONENT_INFORMATION_BASIC_DATA {
9170    #[doc = "Component capability flags"]
9171    pub capabilities: MavProtocolCapability,
9172    #[doc = "Timestamp (time since system boot)."]
9173    pub time_boot_ms: u32,
9174    #[doc = "Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds."]
9175    pub time_manufacture_s: u32,
9176    #[doc = "Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9177    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9178    pub vendor_name: [u8; 32],
9179    #[doc = "Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9180    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9181    pub model_name: [u8; 32],
9182    #[doc = "Software version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9183    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9184    pub software_version: [u8; 24],
9185    #[doc = "Hardware version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9186    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9187    pub hardware_version: [u8; 24],
9188    #[doc = "Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9189    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9190    pub serial_number: [u8; 32],
9191}
9192impl COMPONENT_INFORMATION_BASIC_DATA {
9193    pub const ENCODED_LEN: usize = 160usize;
9194    pub const DEFAULT: Self = Self {
9195        capabilities: MavProtocolCapability::DEFAULT,
9196        time_boot_ms: 0_u32,
9197        time_manufacture_s: 0_u32,
9198        vendor_name: [0_u8; 32usize],
9199        model_name: [0_u8; 32usize],
9200        software_version: [0_u8; 24usize],
9201        hardware_version: [0_u8; 24usize],
9202        serial_number: [0_u8; 32usize],
9203    };
9204    #[cfg(feature = "arbitrary")]
9205    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9206        use arbitrary::{Arbitrary, Unstructured};
9207        let mut buf = [0u8; 1024];
9208        rng.fill_bytes(&mut buf);
9209        let mut unstructured = Unstructured::new(&buf);
9210        Self::arbitrary(&mut unstructured).unwrap_or_default()
9211    }
9212}
9213impl Default for COMPONENT_INFORMATION_BASIC_DATA {
9214    fn default() -> Self {
9215        Self::DEFAULT.clone()
9216    }
9217}
9218impl MessageData for COMPONENT_INFORMATION_BASIC_DATA {
9219    type Message = MavMessage;
9220    const ID: u32 = 396u32;
9221    const NAME: &'static str = "COMPONENT_INFORMATION_BASIC";
9222    const EXTRA_CRC: u8 = 50u8;
9223    const ENCODED_LEN: usize = 160usize;
9224    fn deser(
9225        _version: MavlinkVersion,
9226        __input: &[u8],
9227    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9228        let avail_len = __input.len();
9229        let mut payload_buf = [0; Self::ENCODED_LEN];
9230        let mut buf = if avail_len < Self::ENCODED_LEN {
9231            payload_buf[0..avail_len].copy_from_slice(__input);
9232            Bytes::new(&payload_buf)
9233        } else {
9234            Bytes::new(__input)
9235        };
9236        let mut __struct = Self::default();
9237        let tmp = buf.get_u64_le();
9238        __struct.capabilities = MavProtocolCapability::from_bits(
9239            tmp & MavProtocolCapability::all().bits(),
9240        )
9241        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
9242            flag_type: "MavProtocolCapability",
9243            value: tmp as u32,
9244        })?;
9245        __struct.time_boot_ms = buf.get_u32_le();
9246        __struct.time_manufacture_s = buf.get_u32_le();
9247        for v in &mut __struct.vendor_name {
9248            let val = buf.get_u8();
9249            *v = val;
9250        }
9251        for v in &mut __struct.model_name {
9252            let val = buf.get_u8();
9253            *v = val;
9254        }
9255        for v in &mut __struct.software_version {
9256            let val = buf.get_u8();
9257            *v = val;
9258        }
9259        for v in &mut __struct.hardware_version {
9260            let val = buf.get_u8();
9261            *v = val;
9262        }
9263        for v in &mut __struct.serial_number {
9264            let val = buf.get_u8();
9265            *v = val;
9266        }
9267        Ok(__struct)
9268    }
9269    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9270        let mut __tmp = BytesMut::new(bytes);
9271        #[allow(clippy::absurd_extreme_comparisons)]
9272        #[allow(unused_comparisons)]
9273        if __tmp.remaining() < Self::ENCODED_LEN {
9274            panic!(
9275                "buffer is too small (need {} bytes, but got {})",
9276                Self::ENCODED_LEN,
9277                __tmp.remaining(),
9278            )
9279        }
9280        __tmp.put_u64_le(self.capabilities.bits());
9281        __tmp.put_u32_le(self.time_boot_ms);
9282        __tmp.put_u32_le(self.time_manufacture_s);
9283        for val in &self.vendor_name {
9284            __tmp.put_u8(*val);
9285        }
9286        for val in &self.model_name {
9287            __tmp.put_u8(*val);
9288        }
9289        for val in &self.software_version {
9290            __tmp.put_u8(*val);
9291        }
9292        for val in &self.hardware_version {
9293            __tmp.put_u8(*val);
9294        }
9295        for val in &self.serial_number {
9296            __tmp.put_u8(*val);
9297        }
9298        if matches!(version, MavlinkVersion::V2) {
9299            let len = __tmp.len();
9300            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9301        } else {
9302            __tmp.len()
9303        }
9304    }
9305}
9306#[doc = "id: 397"]
9307#[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
9308#[derive(Debug, Clone, PartialEq)]
9309#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9310#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9311pub struct COMPONENT_METADATA_DATA {
9312    #[doc = "Timestamp (time since system boot)."]
9313    pub time_boot_ms: u32,
9314    #[doc = "CRC32 of the general metadata file."]
9315    pub file_crc: u32,
9316    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9317    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9318    pub uri: [u8; 100],
9319}
9320impl COMPONENT_METADATA_DATA {
9321    pub const ENCODED_LEN: usize = 108usize;
9322    pub const DEFAULT: Self = Self {
9323        time_boot_ms: 0_u32,
9324        file_crc: 0_u32,
9325        uri: [0_u8; 100usize],
9326    };
9327    #[cfg(feature = "arbitrary")]
9328    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9329        use arbitrary::{Arbitrary, Unstructured};
9330        let mut buf = [0u8; 1024];
9331        rng.fill_bytes(&mut buf);
9332        let mut unstructured = Unstructured::new(&buf);
9333        Self::arbitrary(&mut unstructured).unwrap_or_default()
9334    }
9335}
9336impl Default for COMPONENT_METADATA_DATA {
9337    fn default() -> Self {
9338        Self::DEFAULT.clone()
9339    }
9340}
9341impl MessageData for COMPONENT_METADATA_DATA {
9342    type Message = MavMessage;
9343    const ID: u32 = 397u32;
9344    const NAME: &'static str = "COMPONENT_METADATA";
9345    const EXTRA_CRC: u8 = 182u8;
9346    const ENCODED_LEN: usize = 108usize;
9347    fn deser(
9348        _version: MavlinkVersion,
9349        __input: &[u8],
9350    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9351        let avail_len = __input.len();
9352        let mut payload_buf = [0; Self::ENCODED_LEN];
9353        let mut buf = if avail_len < Self::ENCODED_LEN {
9354            payload_buf[0..avail_len].copy_from_slice(__input);
9355            Bytes::new(&payload_buf)
9356        } else {
9357            Bytes::new(__input)
9358        };
9359        let mut __struct = Self::default();
9360        __struct.time_boot_ms = buf.get_u32_le();
9361        __struct.file_crc = buf.get_u32_le();
9362        for v in &mut __struct.uri {
9363            let val = buf.get_u8();
9364            *v = val;
9365        }
9366        Ok(__struct)
9367    }
9368    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9369        let mut __tmp = BytesMut::new(bytes);
9370        #[allow(clippy::absurd_extreme_comparisons)]
9371        #[allow(unused_comparisons)]
9372        if __tmp.remaining() < Self::ENCODED_LEN {
9373            panic!(
9374                "buffer is too small (need {} bytes, but got {})",
9375                Self::ENCODED_LEN,
9376                __tmp.remaining(),
9377            )
9378        }
9379        __tmp.put_u32_le(self.time_boot_ms);
9380        __tmp.put_u32_le(self.file_crc);
9381        for val in &self.uri {
9382            __tmp.put_u8(*val);
9383        }
9384        if matches!(version, MavlinkVersion::V2) {
9385            let len = __tmp.len();
9386            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9387        } else {
9388            __tmp.len()
9389        }
9390    }
9391}
9392#[doc = "id: 146"]
9393#[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
9394#[derive(Debug, Clone, PartialEq)]
9395#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9396#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9397pub struct CONTROL_SYSTEM_STATE_DATA {
9398    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
9399    pub time_usec: u64,
9400    #[doc = "X acceleration in body frame"]
9401    pub x_acc: f32,
9402    #[doc = "Y acceleration in body frame"]
9403    pub y_acc: f32,
9404    #[doc = "Z acceleration in body frame"]
9405    pub z_acc: f32,
9406    #[doc = "X velocity in body frame"]
9407    pub x_vel: f32,
9408    #[doc = "Y velocity in body frame"]
9409    pub y_vel: f32,
9410    #[doc = "Z velocity in body frame"]
9411    pub z_vel: f32,
9412    #[doc = "X position in local frame"]
9413    pub x_pos: f32,
9414    #[doc = "Y position in local frame"]
9415    pub y_pos: f32,
9416    #[doc = "Z position in local frame"]
9417    pub z_pos: f32,
9418    #[doc = "Airspeed, set to -1 if unknown"]
9419    pub airspeed: f32,
9420    #[doc = "Variance of body velocity estimate"]
9421    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9422    pub vel_variance: [f32; 3],
9423    #[doc = "Variance in local position"]
9424    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9425    pub pos_variance: [f32; 3],
9426    #[doc = "The attitude, represented as Quaternion"]
9427    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9428    pub q: [f32; 4],
9429    #[doc = "Angular rate in roll axis"]
9430    pub roll_rate: f32,
9431    #[doc = "Angular rate in pitch axis"]
9432    pub pitch_rate: f32,
9433    #[doc = "Angular rate in yaw axis"]
9434    pub yaw_rate: f32,
9435}
9436impl CONTROL_SYSTEM_STATE_DATA {
9437    pub const ENCODED_LEN: usize = 100usize;
9438    pub const DEFAULT: Self = Self {
9439        time_usec: 0_u64,
9440        x_acc: 0.0_f32,
9441        y_acc: 0.0_f32,
9442        z_acc: 0.0_f32,
9443        x_vel: 0.0_f32,
9444        y_vel: 0.0_f32,
9445        z_vel: 0.0_f32,
9446        x_pos: 0.0_f32,
9447        y_pos: 0.0_f32,
9448        z_pos: 0.0_f32,
9449        airspeed: 0.0_f32,
9450        vel_variance: [0.0_f32; 3usize],
9451        pos_variance: [0.0_f32; 3usize],
9452        q: [0.0_f32; 4usize],
9453        roll_rate: 0.0_f32,
9454        pitch_rate: 0.0_f32,
9455        yaw_rate: 0.0_f32,
9456    };
9457    #[cfg(feature = "arbitrary")]
9458    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9459        use arbitrary::{Arbitrary, Unstructured};
9460        let mut buf = [0u8; 1024];
9461        rng.fill_bytes(&mut buf);
9462        let mut unstructured = Unstructured::new(&buf);
9463        Self::arbitrary(&mut unstructured).unwrap_or_default()
9464    }
9465}
9466impl Default for CONTROL_SYSTEM_STATE_DATA {
9467    fn default() -> Self {
9468        Self::DEFAULT.clone()
9469    }
9470}
9471impl MessageData for CONTROL_SYSTEM_STATE_DATA {
9472    type Message = MavMessage;
9473    const ID: u32 = 146u32;
9474    const NAME: &'static str = "CONTROL_SYSTEM_STATE";
9475    const EXTRA_CRC: u8 = 103u8;
9476    const ENCODED_LEN: usize = 100usize;
9477    fn deser(
9478        _version: MavlinkVersion,
9479        __input: &[u8],
9480    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9481        let avail_len = __input.len();
9482        let mut payload_buf = [0; Self::ENCODED_LEN];
9483        let mut buf = if avail_len < Self::ENCODED_LEN {
9484            payload_buf[0..avail_len].copy_from_slice(__input);
9485            Bytes::new(&payload_buf)
9486        } else {
9487            Bytes::new(__input)
9488        };
9489        let mut __struct = Self::default();
9490        __struct.time_usec = buf.get_u64_le();
9491        __struct.x_acc = buf.get_f32_le();
9492        __struct.y_acc = buf.get_f32_le();
9493        __struct.z_acc = buf.get_f32_le();
9494        __struct.x_vel = buf.get_f32_le();
9495        __struct.y_vel = buf.get_f32_le();
9496        __struct.z_vel = buf.get_f32_le();
9497        __struct.x_pos = buf.get_f32_le();
9498        __struct.y_pos = buf.get_f32_le();
9499        __struct.z_pos = buf.get_f32_le();
9500        __struct.airspeed = buf.get_f32_le();
9501        for v in &mut __struct.vel_variance {
9502            let val = buf.get_f32_le();
9503            *v = val;
9504        }
9505        for v in &mut __struct.pos_variance {
9506            let val = buf.get_f32_le();
9507            *v = val;
9508        }
9509        for v in &mut __struct.q {
9510            let val = buf.get_f32_le();
9511            *v = val;
9512        }
9513        __struct.roll_rate = buf.get_f32_le();
9514        __struct.pitch_rate = buf.get_f32_le();
9515        __struct.yaw_rate = buf.get_f32_le();
9516        Ok(__struct)
9517    }
9518    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9519        let mut __tmp = BytesMut::new(bytes);
9520        #[allow(clippy::absurd_extreme_comparisons)]
9521        #[allow(unused_comparisons)]
9522        if __tmp.remaining() < Self::ENCODED_LEN {
9523            panic!(
9524                "buffer is too small (need {} bytes, but got {})",
9525                Self::ENCODED_LEN,
9526                __tmp.remaining(),
9527            )
9528        }
9529        __tmp.put_u64_le(self.time_usec);
9530        __tmp.put_f32_le(self.x_acc);
9531        __tmp.put_f32_le(self.y_acc);
9532        __tmp.put_f32_le(self.z_acc);
9533        __tmp.put_f32_le(self.x_vel);
9534        __tmp.put_f32_le(self.y_vel);
9535        __tmp.put_f32_le(self.z_vel);
9536        __tmp.put_f32_le(self.x_pos);
9537        __tmp.put_f32_le(self.y_pos);
9538        __tmp.put_f32_le(self.z_pos);
9539        __tmp.put_f32_le(self.airspeed);
9540        for val in &self.vel_variance {
9541            __tmp.put_f32_le(*val);
9542        }
9543        for val in &self.pos_variance {
9544            __tmp.put_f32_le(*val);
9545        }
9546        for val in &self.q {
9547            __tmp.put_f32_le(*val);
9548        }
9549        __tmp.put_f32_le(self.roll_rate);
9550        __tmp.put_f32_le(self.pitch_rate);
9551        __tmp.put_f32_le(self.yaw_rate);
9552        if matches!(version, MavlinkVersion::V2) {
9553            let len = __tmp.len();
9554            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9555        } else {
9556            __tmp.len()
9557        }
9558    }
9559}
9560#[doc = "id: 411"]
9561#[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
9562#[derive(Debug, Clone, PartialEq)]
9563#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9564#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9565pub struct CURRENT_EVENT_SEQUENCE_DATA {
9566    #[doc = "Sequence number."]
9567    pub sequence: u16,
9568    #[doc = "Flag bitset."]
9569    pub flags: MavEventCurrentSequenceFlags,
9570}
9571impl CURRENT_EVENT_SEQUENCE_DATA {
9572    pub const ENCODED_LEN: usize = 3usize;
9573    pub const DEFAULT: Self = Self {
9574        sequence: 0_u16,
9575        flags: MavEventCurrentSequenceFlags::DEFAULT,
9576    };
9577    #[cfg(feature = "arbitrary")]
9578    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9579        use arbitrary::{Arbitrary, Unstructured};
9580        let mut buf = [0u8; 1024];
9581        rng.fill_bytes(&mut buf);
9582        let mut unstructured = Unstructured::new(&buf);
9583        Self::arbitrary(&mut unstructured).unwrap_or_default()
9584    }
9585}
9586impl Default for CURRENT_EVENT_SEQUENCE_DATA {
9587    fn default() -> Self {
9588        Self::DEFAULT.clone()
9589    }
9590}
9591impl MessageData for CURRENT_EVENT_SEQUENCE_DATA {
9592    type Message = MavMessage;
9593    const ID: u32 = 411u32;
9594    const NAME: &'static str = "CURRENT_EVENT_SEQUENCE";
9595    const EXTRA_CRC: u8 = 106u8;
9596    const ENCODED_LEN: usize = 3usize;
9597    fn deser(
9598        _version: MavlinkVersion,
9599        __input: &[u8],
9600    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9601        let avail_len = __input.len();
9602        let mut payload_buf = [0; Self::ENCODED_LEN];
9603        let mut buf = if avail_len < Self::ENCODED_LEN {
9604            payload_buf[0..avail_len].copy_from_slice(__input);
9605            Bytes::new(&payload_buf)
9606        } else {
9607            Bytes::new(__input)
9608        };
9609        let mut __struct = Self::default();
9610        __struct.sequence = buf.get_u16_le();
9611        let tmp = buf.get_u8();
9612        __struct.flags =
9613            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9614                enum_type: "MavEventCurrentSequenceFlags",
9615                value: tmp as u32,
9616            })?;
9617        Ok(__struct)
9618    }
9619    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9620        let mut __tmp = BytesMut::new(bytes);
9621        #[allow(clippy::absurd_extreme_comparisons)]
9622        #[allow(unused_comparisons)]
9623        if __tmp.remaining() < Self::ENCODED_LEN {
9624            panic!(
9625                "buffer is too small (need {} bytes, but got {})",
9626                Self::ENCODED_LEN,
9627                __tmp.remaining(),
9628            )
9629        }
9630        __tmp.put_u16_le(self.sequence);
9631        __tmp.put_u8(self.flags as u8);
9632        if matches!(version, MavlinkVersion::V2) {
9633            let len = __tmp.len();
9634            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9635        } else {
9636            __tmp.len()
9637        }
9638    }
9639}
9640#[doc = "id: 436"]
9641#[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
9642#[derive(Debug, Clone, PartialEq)]
9643#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9644#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9645pub struct CURRENT_MODE_DATA {
9646    #[doc = "A bitfield for use for autopilot-specific flags"]
9647    pub custom_mode: u32,
9648    #[doc = "The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied"]
9649    pub intended_custom_mode: u32,
9650    #[doc = "Standard mode."]
9651    pub standard_mode: MavStandardMode,
9652}
9653impl CURRENT_MODE_DATA {
9654    pub const ENCODED_LEN: usize = 9usize;
9655    pub const DEFAULT: Self = Self {
9656        custom_mode: 0_u32,
9657        intended_custom_mode: 0_u32,
9658        standard_mode: MavStandardMode::DEFAULT,
9659    };
9660    #[cfg(feature = "arbitrary")]
9661    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9662        use arbitrary::{Arbitrary, Unstructured};
9663        let mut buf = [0u8; 1024];
9664        rng.fill_bytes(&mut buf);
9665        let mut unstructured = Unstructured::new(&buf);
9666        Self::arbitrary(&mut unstructured).unwrap_or_default()
9667    }
9668}
9669impl Default for CURRENT_MODE_DATA {
9670    fn default() -> Self {
9671        Self::DEFAULT.clone()
9672    }
9673}
9674impl MessageData for CURRENT_MODE_DATA {
9675    type Message = MavMessage;
9676    const ID: u32 = 436u32;
9677    const NAME: &'static str = "CURRENT_MODE";
9678    const EXTRA_CRC: u8 = 193u8;
9679    const ENCODED_LEN: usize = 9usize;
9680    fn deser(
9681        _version: MavlinkVersion,
9682        __input: &[u8],
9683    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9684        let avail_len = __input.len();
9685        let mut payload_buf = [0; Self::ENCODED_LEN];
9686        let mut buf = if avail_len < Self::ENCODED_LEN {
9687            payload_buf[0..avail_len].copy_from_slice(__input);
9688            Bytes::new(&payload_buf)
9689        } else {
9690            Bytes::new(__input)
9691        };
9692        let mut __struct = Self::default();
9693        __struct.custom_mode = buf.get_u32_le();
9694        __struct.intended_custom_mode = buf.get_u32_le();
9695        let tmp = buf.get_u8();
9696        __struct.standard_mode =
9697            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9698                enum_type: "MavStandardMode",
9699                value: tmp as u32,
9700            })?;
9701        Ok(__struct)
9702    }
9703    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9704        let mut __tmp = BytesMut::new(bytes);
9705        #[allow(clippy::absurd_extreme_comparisons)]
9706        #[allow(unused_comparisons)]
9707        if __tmp.remaining() < Self::ENCODED_LEN {
9708            panic!(
9709                "buffer is too small (need {} bytes, but got {})",
9710                Self::ENCODED_LEN,
9711                __tmp.remaining(),
9712            )
9713        }
9714        __tmp.put_u32_le(self.custom_mode);
9715        __tmp.put_u32_le(self.intended_custom_mode);
9716        __tmp.put_u8(self.standard_mode as u8);
9717        if matches!(version, MavlinkVersion::V2) {
9718            let len = __tmp.len();
9719            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9720        } else {
9721            __tmp.len()
9722        }
9723    }
9724}
9725#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
9726#[doc = "id: 67"]
9727#[doc = "Data stream status information."]
9728#[derive(Debug, Clone, PartialEq)]
9729#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9730#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9731pub struct DATA_STREAM_DATA {
9732    #[doc = "The message rate"]
9733    pub message_rate: u16,
9734    #[doc = "The ID of the requested data stream"]
9735    pub stream_id: u8,
9736    #[doc = "1 stream is enabled, 0 stream is stopped."]
9737    pub on_off: u8,
9738}
9739impl DATA_STREAM_DATA {
9740    pub const ENCODED_LEN: usize = 4usize;
9741    pub const DEFAULT: Self = Self {
9742        message_rate: 0_u16,
9743        stream_id: 0_u8,
9744        on_off: 0_u8,
9745    };
9746    #[cfg(feature = "arbitrary")]
9747    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9748        use arbitrary::{Arbitrary, Unstructured};
9749        let mut buf = [0u8; 1024];
9750        rng.fill_bytes(&mut buf);
9751        let mut unstructured = Unstructured::new(&buf);
9752        Self::arbitrary(&mut unstructured).unwrap_or_default()
9753    }
9754}
9755impl Default for DATA_STREAM_DATA {
9756    fn default() -> Self {
9757        Self::DEFAULT.clone()
9758    }
9759}
9760impl MessageData for DATA_STREAM_DATA {
9761    type Message = MavMessage;
9762    const ID: u32 = 67u32;
9763    const NAME: &'static str = "DATA_STREAM";
9764    const EXTRA_CRC: u8 = 21u8;
9765    const ENCODED_LEN: usize = 4usize;
9766    fn deser(
9767        _version: MavlinkVersion,
9768        __input: &[u8],
9769    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9770        let avail_len = __input.len();
9771        let mut payload_buf = [0; Self::ENCODED_LEN];
9772        let mut buf = if avail_len < Self::ENCODED_LEN {
9773            payload_buf[0..avail_len].copy_from_slice(__input);
9774            Bytes::new(&payload_buf)
9775        } else {
9776            Bytes::new(__input)
9777        };
9778        let mut __struct = Self::default();
9779        __struct.message_rate = buf.get_u16_le();
9780        __struct.stream_id = buf.get_u8();
9781        __struct.on_off = buf.get_u8();
9782        Ok(__struct)
9783    }
9784    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9785        let mut __tmp = BytesMut::new(bytes);
9786        #[allow(clippy::absurd_extreme_comparisons)]
9787        #[allow(unused_comparisons)]
9788        if __tmp.remaining() < Self::ENCODED_LEN {
9789            panic!(
9790                "buffer is too small (need {} bytes, but got {})",
9791                Self::ENCODED_LEN,
9792                __tmp.remaining(),
9793            )
9794        }
9795        __tmp.put_u16_le(self.message_rate);
9796        __tmp.put_u8(self.stream_id);
9797        __tmp.put_u8(self.on_off);
9798        if matches!(version, MavlinkVersion::V2) {
9799            let len = __tmp.len();
9800            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9801        } else {
9802            __tmp.len()
9803        }
9804    }
9805}
9806#[doc = "id: 130"]
9807#[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
9808#[derive(Debug, Clone, PartialEq)]
9809#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9810#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9811pub struct DATA_TRANSMISSION_HANDSHAKE_DATA {
9812    #[doc = "total data size (set on ACK only)."]
9813    pub size: u32,
9814    #[doc = "Width of a matrix or image."]
9815    pub width: u16,
9816    #[doc = "Height of a matrix or image."]
9817    pub height: u16,
9818    #[doc = "Number of packets being sent (set on ACK only)."]
9819    pub packets: u16,
9820    #[doc = "Type of requested/acknowledged data."]
9821    pub mavtype: MavlinkDataStreamType,
9822    #[doc = "Payload size per packet (normally 253 byte, see DATA field size in message ENCAPSULATED_DATA) (set on ACK only)."]
9823    pub payload: u8,
9824    #[doc = "JPEG quality. Values: [1-100]."]
9825    pub jpg_quality: u8,
9826}
9827impl DATA_TRANSMISSION_HANDSHAKE_DATA {
9828    pub const ENCODED_LEN: usize = 13usize;
9829    pub const DEFAULT: Self = Self {
9830        size: 0_u32,
9831        width: 0_u16,
9832        height: 0_u16,
9833        packets: 0_u16,
9834        mavtype: MavlinkDataStreamType::DEFAULT,
9835        payload: 0_u8,
9836        jpg_quality: 0_u8,
9837    };
9838    #[cfg(feature = "arbitrary")]
9839    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9840        use arbitrary::{Arbitrary, Unstructured};
9841        let mut buf = [0u8; 1024];
9842        rng.fill_bytes(&mut buf);
9843        let mut unstructured = Unstructured::new(&buf);
9844        Self::arbitrary(&mut unstructured).unwrap_or_default()
9845    }
9846}
9847impl Default for DATA_TRANSMISSION_HANDSHAKE_DATA {
9848    fn default() -> Self {
9849        Self::DEFAULT.clone()
9850    }
9851}
9852impl MessageData for DATA_TRANSMISSION_HANDSHAKE_DATA {
9853    type Message = MavMessage;
9854    const ID: u32 = 130u32;
9855    const NAME: &'static str = "DATA_TRANSMISSION_HANDSHAKE";
9856    const EXTRA_CRC: u8 = 29u8;
9857    const ENCODED_LEN: usize = 13usize;
9858    fn deser(
9859        _version: MavlinkVersion,
9860        __input: &[u8],
9861    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9862        let avail_len = __input.len();
9863        let mut payload_buf = [0; Self::ENCODED_LEN];
9864        let mut buf = if avail_len < Self::ENCODED_LEN {
9865            payload_buf[0..avail_len].copy_from_slice(__input);
9866            Bytes::new(&payload_buf)
9867        } else {
9868            Bytes::new(__input)
9869        };
9870        let mut __struct = Self::default();
9871        __struct.size = buf.get_u32_le();
9872        __struct.width = buf.get_u16_le();
9873        __struct.height = buf.get_u16_le();
9874        __struct.packets = buf.get_u16_le();
9875        let tmp = buf.get_u8();
9876        __struct.mavtype =
9877            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9878                enum_type: "MavlinkDataStreamType",
9879                value: tmp as u32,
9880            })?;
9881        __struct.payload = buf.get_u8();
9882        __struct.jpg_quality = buf.get_u8();
9883        Ok(__struct)
9884    }
9885    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9886        let mut __tmp = BytesMut::new(bytes);
9887        #[allow(clippy::absurd_extreme_comparisons)]
9888        #[allow(unused_comparisons)]
9889        if __tmp.remaining() < Self::ENCODED_LEN {
9890            panic!(
9891                "buffer is too small (need {} bytes, but got {})",
9892                Self::ENCODED_LEN,
9893                __tmp.remaining(),
9894            )
9895        }
9896        __tmp.put_u32_le(self.size);
9897        __tmp.put_u16_le(self.width);
9898        __tmp.put_u16_le(self.height);
9899        __tmp.put_u16_le(self.packets);
9900        __tmp.put_u8(self.mavtype as u8);
9901        __tmp.put_u8(self.payload);
9902        __tmp.put_u8(self.jpg_quality);
9903        if matches!(version, MavlinkVersion::V2) {
9904            let len = __tmp.len();
9905            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9906        } else {
9907            __tmp.len()
9908        }
9909    }
9910}
9911#[doc = "id: 254"]
9912#[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
9913#[derive(Debug, Clone, PartialEq)]
9914#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9915#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9916pub struct DEBUG_DATA {
9917    #[doc = "Timestamp (time since system boot)."]
9918    pub time_boot_ms: u32,
9919    #[doc = "DEBUG value"]
9920    pub value: f32,
9921    #[doc = "index of debug variable"]
9922    pub ind: u8,
9923}
9924impl DEBUG_DATA {
9925    pub const ENCODED_LEN: usize = 9usize;
9926    pub const DEFAULT: Self = Self {
9927        time_boot_ms: 0_u32,
9928        value: 0.0_f32,
9929        ind: 0_u8,
9930    };
9931    #[cfg(feature = "arbitrary")]
9932    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9933        use arbitrary::{Arbitrary, Unstructured};
9934        let mut buf = [0u8; 1024];
9935        rng.fill_bytes(&mut buf);
9936        let mut unstructured = Unstructured::new(&buf);
9937        Self::arbitrary(&mut unstructured).unwrap_or_default()
9938    }
9939}
9940impl Default for DEBUG_DATA {
9941    fn default() -> Self {
9942        Self::DEFAULT.clone()
9943    }
9944}
9945impl MessageData for DEBUG_DATA {
9946    type Message = MavMessage;
9947    const ID: u32 = 254u32;
9948    const NAME: &'static str = "DEBUG";
9949    const EXTRA_CRC: u8 = 46u8;
9950    const ENCODED_LEN: usize = 9usize;
9951    fn deser(
9952        _version: MavlinkVersion,
9953        __input: &[u8],
9954    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9955        let avail_len = __input.len();
9956        let mut payload_buf = [0; Self::ENCODED_LEN];
9957        let mut buf = if avail_len < Self::ENCODED_LEN {
9958            payload_buf[0..avail_len].copy_from_slice(__input);
9959            Bytes::new(&payload_buf)
9960        } else {
9961            Bytes::new(__input)
9962        };
9963        let mut __struct = Self::default();
9964        __struct.time_boot_ms = buf.get_u32_le();
9965        __struct.value = buf.get_f32_le();
9966        __struct.ind = buf.get_u8();
9967        Ok(__struct)
9968    }
9969    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9970        let mut __tmp = BytesMut::new(bytes);
9971        #[allow(clippy::absurd_extreme_comparisons)]
9972        #[allow(unused_comparisons)]
9973        if __tmp.remaining() < Self::ENCODED_LEN {
9974            panic!(
9975                "buffer is too small (need {} bytes, but got {})",
9976                Self::ENCODED_LEN,
9977                __tmp.remaining(),
9978            )
9979        }
9980        __tmp.put_u32_le(self.time_boot_ms);
9981        __tmp.put_f32_le(self.value);
9982        __tmp.put_u8(self.ind);
9983        if matches!(version, MavlinkVersion::V2) {
9984            let len = __tmp.len();
9985            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9986        } else {
9987            __tmp.len()
9988        }
9989    }
9990}
9991#[doc = "id: 350"]
9992#[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
9993#[derive(Debug, Clone, PartialEq)]
9994#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9995#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9996pub struct DEBUG_FLOAT_ARRAY_DATA {
9997    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
9998    pub time_usec: u64,
9999    #[doc = "Unique ID used to discriminate between arrays"]
10000    pub array_id: u16,
10001    #[doc = "Name, for human-friendly display in a Ground Control Station"]
10002    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10003    pub name: [u8; 10],
10004    #[doc = "data"]
10005    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10006    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10007    pub data: [f32; 58],
10008}
10009impl DEBUG_FLOAT_ARRAY_DATA {
10010    pub const ENCODED_LEN: usize = 252usize;
10011    pub const DEFAULT: Self = Self {
10012        time_usec: 0_u64,
10013        array_id: 0_u16,
10014        name: [0_u8; 10usize],
10015        data: [0.0_f32; 58usize],
10016    };
10017    #[cfg(feature = "arbitrary")]
10018    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10019        use arbitrary::{Arbitrary, Unstructured};
10020        let mut buf = [0u8; 1024];
10021        rng.fill_bytes(&mut buf);
10022        let mut unstructured = Unstructured::new(&buf);
10023        Self::arbitrary(&mut unstructured).unwrap_or_default()
10024    }
10025}
10026impl Default for DEBUG_FLOAT_ARRAY_DATA {
10027    fn default() -> Self {
10028        Self::DEFAULT.clone()
10029    }
10030}
10031impl MessageData for DEBUG_FLOAT_ARRAY_DATA {
10032    type Message = MavMessage;
10033    const ID: u32 = 350u32;
10034    const NAME: &'static str = "DEBUG_FLOAT_ARRAY";
10035    const EXTRA_CRC: u8 = 232u8;
10036    const ENCODED_LEN: usize = 252usize;
10037    fn deser(
10038        _version: MavlinkVersion,
10039        __input: &[u8],
10040    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10041        let avail_len = __input.len();
10042        let mut payload_buf = [0; Self::ENCODED_LEN];
10043        let mut buf = if avail_len < Self::ENCODED_LEN {
10044            payload_buf[0..avail_len].copy_from_slice(__input);
10045            Bytes::new(&payload_buf)
10046        } else {
10047            Bytes::new(__input)
10048        };
10049        let mut __struct = Self::default();
10050        __struct.time_usec = buf.get_u64_le();
10051        __struct.array_id = buf.get_u16_le();
10052        for v in &mut __struct.name {
10053            let val = buf.get_u8();
10054            *v = val;
10055        }
10056        for v in &mut __struct.data {
10057            let val = buf.get_f32_le();
10058            *v = val;
10059        }
10060        Ok(__struct)
10061    }
10062    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10063        let mut __tmp = BytesMut::new(bytes);
10064        #[allow(clippy::absurd_extreme_comparisons)]
10065        #[allow(unused_comparisons)]
10066        if __tmp.remaining() < Self::ENCODED_LEN {
10067            panic!(
10068                "buffer is too small (need {} bytes, but got {})",
10069                Self::ENCODED_LEN,
10070                __tmp.remaining(),
10071            )
10072        }
10073        __tmp.put_u64_le(self.time_usec);
10074        __tmp.put_u16_le(self.array_id);
10075        for val in &self.name {
10076            __tmp.put_u8(*val);
10077        }
10078        for val in &self.data {
10079            __tmp.put_f32_le(*val);
10080        }
10081        if matches!(version, MavlinkVersion::V2) {
10082            let len = __tmp.len();
10083            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10084        } else {
10085            __tmp.len()
10086        }
10087    }
10088}
10089#[doc = "id: 250"]
10090#[doc = "To debug something using a named 3D vector."]
10091#[derive(Debug, Clone, PartialEq)]
10092#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10093#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10094pub struct DEBUG_VECT_DATA {
10095    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10096    pub time_usec: u64,
10097    #[doc = "x"]
10098    pub x: f32,
10099    #[doc = "y"]
10100    pub y: f32,
10101    #[doc = "z"]
10102    pub z: f32,
10103    #[doc = "Name"]
10104    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10105    pub name: [u8; 10],
10106}
10107impl DEBUG_VECT_DATA {
10108    pub const ENCODED_LEN: usize = 30usize;
10109    pub const DEFAULT: Self = Self {
10110        time_usec: 0_u64,
10111        x: 0.0_f32,
10112        y: 0.0_f32,
10113        z: 0.0_f32,
10114        name: [0_u8; 10usize],
10115    };
10116    #[cfg(feature = "arbitrary")]
10117    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10118        use arbitrary::{Arbitrary, Unstructured};
10119        let mut buf = [0u8; 1024];
10120        rng.fill_bytes(&mut buf);
10121        let mut unstructured = Unstructured::new(&buf);
10122        Self::arbitrary(&mut unstructured).unwrap_or_default()
10123    }
10124}
10125impl Default for DEBUG_VECT_DATA {
10126    fn default() -> Self {
10127        Self::DEFAULT.clone()
10128    }
10129}
10130impl MessageData for DEBUG_VECT_DATA {
10131    type Message = MavMessage;
10132    const ID: u32 = 250u32;
10133    const NAME: &'static str = "DEBUG_VECT";
10134    const EXTRA_CRC: u8 = 49u8;
10135    const ENCODED_LEN: usize = 30usize;
10136    fn deser(
10137        _version: MavlinkVersion,
10138        __input: &[u8],
10139    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10140        let avail_len = __input.len();
10141        let mut payload_buf = [0; Self::ENCODED_LEN];
10142        let mut buf = if avail_len < Self::ENCODED_LEN {
10143            payload_buf[0..avail_len].copy_from_slice(__input);
10144            Bytes::new(&payload_buf)
10145        } else {
10146            Bytes::new(__input)
10147        };
10148        let mut __struct = Self::default();
10149        __struct.time_usec = buf.get_u64_le();
10150        __struct.x = buf.get_f32_le();
10151        __struct.y = buf.get_f32_le();
10152        __struct.z = buf.get_f32_le();
10153        for v in &mut __struct.name {
10154            let val = buf.get_u8();
10155            *v = val;
10156        }
10157        Ok(__struct)
10158    }
10159    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10160        let mut __tmp = BytesMut::new(bytes);
10161        #[allow(clippy::absurd_extreme_comparisons)]
10162        #[allow(unused_comparisons)]
10163        if __tmp.remaining() < Self::ENCODED_LEN {
10164            panic!(
10165                "buffer is too small (need {} bytes, but got {})",
10166                Self::ENCODED_LEN,
10167                __tmp.remaining(),
10168            )
10169        }
10170        __tmp.put_u64_le(self.time_usec);
10171        __tmp.put_f32_le(self.x);
10172        __tmp.put_f32_le(self.y);
10173        __tmp.put_f32_le(self.z);
10174        for val in &self.name {
10175            __tmp.put_u8(*val);
10176        }
10177        if matches!(version, MavlinkVersion::V2) {
10178            let len = __tmp.len();
10179            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10180        } else {
10181            __tmp.len()
10182        }
10183    }
10184}
10185#[doc = "id: 132"]
10186#[doc = "Distance sensor information for an onboard rangefinder."]
10187#[derive(Debug, Clone, PartialEq)]
10188#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10189#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10190pub struct DISTANCE_SENSOR_DATA {
10191    #[doc = "Timestamp (time since system boot)."]
10192    pub time_boot_ms: u32,
10193    #[doc = "Minimum distance the sensor can measure"]
10194    pub min_distance: u16,
10195    #[doc = "Maximum distance the sensor can measure"]
10196    pub max_distance: u16,
10197    #[doc = "Current distance reading"]
10198    pub current_distance: u16,
10199    #[doc = "Type of distance sensor."]
10200    pub mavtype: MavDistanceSensor,
10201    #[doc = "Onboard ID of the sensor"]
10202    pub id: u8,
10203    #[doc = "Direction the sensor faces. downward-facing: ROTATION_PITCH_270, upward-facing: ROTATION_PITCH_90, backward-facing: ROTATION_PITCH_180, forward-facing: ROTATION_NONE, left-facing: ROTATION_YAW_90, right-facing: ROTATION_YAW_270"]
10204    pub orientation: MavSensorOrientation,
10205    #[doc = "Measurement variance. Max standard deviation is 6cm. UINT8_MAX if unknown."]
10206    pub covariance: u8,
10207    #[doc = "Horizontal Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
10208    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10209    pub horizontal_fov: f32,
10210    #[doc = "Vertical Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
10211    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10212    pub vertical_fov: f32,
10213    #[doc = "Quaternion of the sensor orientation in vehicle body frame (w, x, y, z order, zero-rotation is 1, 0, 0, 0). Zero-rotation is along the vehicle body x-axis. This field is required if the orientation is set to MAV_SENSOR_ROTATION_CUSTOM. Set it to 0 if invalid.\""]
10214    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10215    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10216    pub quaternion: [f32; 4],
10217    #[doc = "Signal quality of the sensor. Specific to each sensor type, representing the relation of the signal strength with the target reflectivity, distance, size or aspect, but normalised as a percentage. 0 = unknown/unset signal quality, 1 = invalid signal, 100 = perfect signal."]
10218    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10219    pub signal_quality: u8,
10220}
10221impl DISTANCE_SENSOR_DATA {
10222    pub const ENCODED_LEN: usize = 39usize;
10223    pub const DEFAULT: Self = Self {
10224        time_boot_ms: 0_u32,
10225        min_distance: 0_u16,
10226        max_distance: 0_u16,
10227        current_distance: 0_u16,
10228        mavtype: MavDistanceSensor::DEFAULT,
10229        id: 0_u8,
10230        orientation: MavSensorOrientation::DEFAULT,
10231        covariance: 0_u8,
10232        horizontal_fov: 0.0_f32,
10233        vertical_fov: 0.0_f32,
10234        quaternion: [0.0_f32; 4usize],
10235        signal_quality: 0_u8,
10236    };
10237    #[cfg(feature = "arbitrary")]
10238    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10239        use arbitrary::{Arbitrary, Unstructured};
10240        let mut buf = [0u8; 1024];
10241        rng.fill_bytes(&mut buf);
10242        let mut unstructured = Unstructured::new(&buf);
10243        Self::arbitrary(&mut unstructured).unwrap_or_default()
10244    }
10245}
10246impl Default for DISTANCE_SENSOR_DATA {
10247    fn default() -> Self {
10248        Self::DEFAULT.clone()
10249    }
10250}
10251impl MessageData for DISTANCE_SENSOR_DATA {
10252    type Message = MavMessage;
10253    const ID: u32 = 132u32;
10254    const NAME: &'static str = "DISTANCE_SENSOR";
10255    const EXTRA_CRC: u8 = 85u8;
10256    const ENCODED_LEN: usize = 39usize;
10257    fn deser(
10258        _version: MavlinkVersion,
10259        __input: &[u8],
10260    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10261        let avail_len = __input.len();
10262        let mut payload_buf = [0; Self::ENCODED_LEN];
10263        let mut buf = if avail_len < Self::ENCODED_LEN {
10264            payload_buf[0..avail_len].copy_from_slice(__input);
10265            Bytes::new(&payload_buf)
10266        } else {
10267            Bytes::new(__input)
10268        };
10269        let mut __struct = Self::default();
10270        __struct.time_boot_ms = buf.get_u32_le();
10271        __struct.min_distance = buf.get_u16_le();
10272        __struct.max_distance = buf.get_u16_le();
10273        __struct.current_distance = buf.get_u16_le();
10274        let tmp = buf.get_u8();
10275        __struct.mavtype =
10276            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10277                enum_type: "MavDistanceSensor",
10278                value: tmp as u32,
10279            })?;
10280        __struct.id = buf.get_u8();
10281        let tmp = buf.get_u8();
10282        __struct.orientation =
10283            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10284                enum_type: "MavSensorOrientation",
10285                value: tmp as u32,
10286            })?;
10287        __struct.covariance = buf.get_u8();
10288        __struct.horizontal_fov = buf.get_f32_le();
10289        __struct.vertical_fov = buf.get_f32_le();
10290        for v in &mut __struct.quaternion {
10291            let val = buf.get_f32_le();
10292            *v = val;
10293        }
10294        __struct.signal_quality = buf.get_u8();
10295        Ok(__struct)
10296    }
10297    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10298        let mut __tmp = BytesMut::new(bytes);
10299        #[allow(clippy::absurd_extreme_comparisons)]
10300        #[allow(unused_comparisons)]
10301        if __tmp.remaining() < Self::ENCODED_LEN {
10302            panic!(
10303                "buffer is too small (need {} bytes, but got {})",
10304                Self::ENCODED_LEN,
10305                __tmp.remaining(),
10306            )
10307        }
10308        __tmp.put_u32_le(self.time_boot_ms);
10309        __tmp.put_u16_le(self.min_distance);
10310        __tmp.put_u16_le(self.max_distance);
10311        __tmp.put_u16_le(self.current_distance);
10312        __tmp.put_u8(self.mavtype as u8);
10313        __tmp.put_u8(self.id);
10314        __tmp.put_u8(self.orientation as u8);
10315        __tmp.put_u8(self.covariance);
10316        __tmp.put_f32_le(self.horizontal_fov);
10317        __tmp.put_f32_le(self.vertical_fov);
10318        for val in &self.quaternion {
10319            __tmp.put_f32_le(*val);
10320        }
10321        __tmp.put_u8(self.signal_quality);
10322        if matches!(version, MavlinkVersion::V2) {
10323            let len = __tmp.len();
10324            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10325        } else {
10326            __tmp.len()
10327        }
10328    }
10329}
10330#[doc = "id: 225"]
10331#[doc = "EFI status output."]
10332#[derive(Debug, Clone, PartialEq)]
10333#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10334#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10335pub struct EFI_STATUS_DATA {
10336    #[doc = "ECU index"]
10337    pub ecu_index: f32,
10338    #[doc = "RPM"]
10339    pub rpm: f32,
10340    #[doc = "Fuel consumed"]
10341    pub fuel_consumed: f32,
10342    #[doc = "Fuel flow rate"]
10343    pub fuel_flow: f32,
10344    #[doc = "Engine load"]
10345    pub engine_load: f32,
10346    #[doc = "Throttle position"]
10347    pub throttle_position: f32,
10348    #[doc = "Spark dwell time"]
10349    pub spark_dwell_time: f32,
10350    #[doc = "Barometric pressure"]
10351    pub barometric_pressure: f32,
10352    #[doc = "Intake manifold pressure("]
10353    pub intake_manifold_pressure: f32,
10354    #[doc = "Intake manifold temperature"]
10355    pub intake_manifold_temperature: f32,
10356    #[doc = "Cylinder head temperature"]
10357    pub cylinder_head_temperature: f32,
10358    #[doc = "Ignition timing (Crank angle degrees)"]
10359    pub ignition_timing: f32,
10360    #[doc = "Injection time"]
10361    pub injection_time: f32,
10362    #[doc = "Exhaust gas temperature"]
10363    pub exhaust_gas_temperature: f32,
10364    #[doc = "Output throttle"]
10365    pub throttle_out: f32,
10366    #[doc = "Pressure/temperature compensation"]
10367    pub pt_compensation: f32,
10368    #[doc = "EFI health status"]
10369    pub health: u8,
10370    #[doc = "Supply voltage to EFI sparking system.  Zero in this value means \"unknown\", so if the supply voltage really is zero volts use 0.0001 instead."]
10371    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10372    pub ignition_voltage: f32,
10373    #[doc = "Fuel pressure. Zero in this value means \"unknown\", so if the fuel pressure really is zero kPa use 0.0001 instead."]
10374    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10375    pub fuel_pressure: f32,
10376}
10377impl EFI_STATUS_DATA {
10378    pub const ENCODED_LEN: usize = 73usize;
10379    pub const DEFAULT: Self = Self {
10380        ecu_index: 0.0_f32,
10381        rpm: 0.0_f32,
10382        fuel_consumed: 0.0_f32,
10383        fuel_flow: 0.0_f32,
10384        engine_load: 0.0_f32,
10385        throttle_position: 0.0_f32,
10386        spark_dwell_time: 0.0_f32,
10387        barometric_pressure: 0.0_f32,
10388        intake_manifold_pressure: 0.0_f32,
10389        intake_manifold_temperature: 0.0_f32,
10390        cylinder_head_temperature: 0.0_f32,
10391        ignition_timing: 0.0_f32,
10392        injection_time: 0.0_f32,
10393        exhaust_gas_temperature: 0.0_f32,
10394        throttle_out: 0.0_f32,
10395        pt_compensation: 0.0_f32,
10396        health: 0_u8,
10397        ignition_voltage: 0.0_f32,
10398        fuel_pressure: 0.0_f32,
10399    };
10400    #[cfg(feature = "arbitrary")]
10401    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10402        use arbitrary::{Arbitrary, Unstructured};
10403        let mut buf = [0u8; 1024];
10404        rng.fill_bytes(&mut buf);
10405        let mut unstructured = Unstructured::new(&buf);
10406        Self::arbitrary(&mut unstructured).unwrap_or_default()
10407    }
10408}
10409impl Default for EFI_STATUS_DATA {
10410    fn default() -> Self {
10411        Self::DEFAULT.clone()
10412    }
10413}
10414impl MessageData for EFI_STATUS_DATA {
10415    type Message = MavMessage;
10416    const ID: u32 = 225u32;
10417    const NAME: &'static str = "EFI_STATUS";
10418    const EXTRA_CRC: u8 = 208u8;
10419    const ENCODED_LEN: usize = 73usize;
10420    fn deser(
10421        _version: MavlinkVersion,
10422        __input: &[u8],
10423    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10424        let avail_len = __input.len();
10425        let mut payload_buf = [0; Self::ENCODED_LEN];
10426        let mut buf = if avail_len < Self::ENCODED_LEN {
10427            payload_buf[0..avail_len].copy_from_slice(__input);
10428            Bytes::new(&payload_buf)
10429        } else {
10430            Bytes::new(__input)
10431        };
10432        let mut __struct = Self::default();
10433        __struct.ecu_index = buf.get_f32_le();
10434        __struct.rpm = buf.get_f32_le();
10435        __struct.fuel_consumed = buf.get_f32_le();
10436        __struct.fuel_flow = buf.get_f32_le();
10437        __struct.engine_load = buf.get_f32_le();
10438        __struct.throttle_position = buf.get_f32_le();
10439        __struct.spark_dwell_time = buf.get_f32_le();
10440        __struct.barometric_pressure = buf.get_f32_le();
10441        __struct.intake_manifold_pressure = buf.get_f32_le();
10442        __struct.intake_manifold_temperature = buf.get_f32_le();
10443        __struct.cylinder_head_temperature = buf.get_f32_le();
10444        __struct.ignition_timing = buf.get_f32_le();
10445        __struct.injection_time = buf.get_f32_le();
10446        __struct.exhaust_gas_temperature = buf.get_f32_le();
10447        __struct.throttle_out = buf.get_f32_le();
10448        __struct.pt_compensation = buf.get_f32_le();
10449        __struct.health = buf.get_u8();
10450        __struct.ignition_voltage = buf.get_f32_le();
10451        __struct.fuel_pressure = buf.get_f32_le();
10452        Ok(__struct)
10453    }
10454    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10455        let mut __tmp = BytesMut::new(bytes);
10456        #[allow(clippy::absurd_extreme_comparisons)]
10457        #[allow(unused_comparisons)]
10458        if __tmp.remaining() < Self::ENCODED_LEN {
10459            panic!(
10460                "buffer is too small (need {} bytes, but got {})",
10461                Self::ENCODED_LEN,
10462                __tmp.remaining(),
10463            )
10464        }
10465        __tmp.put_f32_le(self.ecu_index);
10466        __tmp.put_f32_le(self.rpm);
10467        __tmp.put_f32_le(self.fuel_consumed);
10468        __tmp.put_f32_le(self.fuel_flow);
10469        __tmp.put_f32_le(self.engine_load);
10470        __tmp.put_f32_le(self.throttle_position);
10471        __tmp.put_f32_le(self.spark_dwell_time);
10472        __tmp.put_f32_le(self.barometric_pressure);
10473        __tmp.put_f32_le(self.intake_manifold_pressure);
10474        __tmp.put_f32_le(self.intake_manifold_temperature);
10475        __tmp.put_f32_le(self.cylinder_head_temperature);
10476        __tmp.put_f32_le(self.ignition_timing);
10477        __tmp.put_f32_le(self.injection_time);
10478        __tmp.put_f32_le(self.exhaust_gas_temperature);
10479        __tmp.put_f32_le(self.throttle_out);
10480        __tmp.put_f32_le(self.pt_compensation);
10481        __tmp.put_u8(self.health);
10482        __tmp.put_f32_le(self.ignition_voltage);
10483        __tmp.put_f32_le(self.fuel_pressure);
10484        if matches!(version, MavlinkVersion::V2) {
10485            let len = __tmp.len();
10486            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10487        } else {
10488            __tmp.len()
10489        }
10490    }
10491}
10492#[doc = "id: 131"]
10493#[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
10494#[derive(Debug, Clone, PartialEq)]
10495#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10496#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10497pub struct ENCAPSULATED_DATA_DATA {
10498    #[doc = "sequence number (starting with 0 on every transmission)"]
10499    pub seqnr: u16,
10500    #[doc = "image data bytes"]
10501    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10502    pub data: [u8; 253],
10503}
10504impl ENCAPSULATED_DATA_DATA {
10505    pub const ENCODED_LEN: usize = 255usize;
10506    pub const DEFAULT: Self = Self {
10507        seqnr: 0_u16,
10508        data: [0_u8; 253usize],
10509    };
10510    #[cfg(feature = "arbitrary")]
10511    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10512        use arbitrary::{Arbitrary, Unstructured};
10513        let mut buf = [0u8; 1024];
10514        rng.fill_bytes(&mut buf);
10515        let mut unstructured = Unstructured::new(&buf);
10516        Self::arbitrary(&mut unstructured).unwrap_or_default()
10517    }
10518}
10519impl Default for ENCAPSULATED_DATA_DATA {
10520    fn default() -> Self {
10521        Self::DEFAULT.clone()
10522    }
10523}
10524impl MessageData for ENCAPSULATED_DATA_DATA {
10525    type Message = MavMessage;
10526    const ID: u32 = 131u32;
10527    const NAME: &'static str = "ENCAPSULATED_DATA";
10528    const EXTRA_CRC: u8 = 223u8;
10529    const ENCODED_LEN: usize = 255usize;
10530    fn deser(
10531        _version: MavlinkVersion,
10532        __input: &[u8],
10533    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10534        let avail_len = __input.len();
10535        let mut payload_buf = [0; Self::ENCODED_LEN];
10536        let mut buf = if avail_len < Self::ENCODED_LEN {
10537            payload_buf[0..avail_len].copy_from_slice(__input);
10538            Bytes::new(&payload_buf)
10539        } else {
10540            Bytes::new(__input)
10541        };
10542        let mut __struct = Self::default();
10543        __struct.seqnr = buf.get_u16_le();
10544        for v in &mut __struct.data {
10545            let val = buf.get_u8();
10546            *v = val;
10547        }
10548        Ok(__struct)
10549    }
10550    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10551        let mut __tmp = BytesMut::new(bytes);
10552        #[allow(clippy::absurd_extreme_comparisons)]
10553        #[allow(unused_comparisons)]
10554        if __tmp.remaining() < Self::ENCODED_LEN {
10555            panic!(
10556                "buffer is too small (need {} bytes, but got {})",
10557                Self::ENCODED_LEN,
10558                __tmp.remaining(),
10559            )
10560        }
10561        __tmp.put_u16_le(self.seqnr);
10562        for val in &self.data {
10563            __tmp.put_u8(*val);
10564        }
10565        if matches!(version, MavlinkVersion::V2) {
10566            let len = __tmp.len();
10567            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10568        } else {
10569            __tmp.len()
10570        }
10571    }
10572}
10573#[doc = "id: 290"]
10574#[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
10575#[derive(Debug, Clone, PartialEq)]
10576#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10577#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10578pub struct ESC_INFO_DATA {
10579    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
10580    pub time_usec: u64,
10581    #[doc = "Number of reported errors by each ESC since boot."]
10582    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10583    pub error_count: [u32; 4],
10584    #[doc = "Counter of data packets received."]
10585    pub counter: u16,
10586    #[doc = "Bitmap of ESC failure flags."]
10587    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10588    pub failure_flags: [u16; 4],
10589    #[doc = "Temperature of each ESC. INT16_MAX: if data not supplied by ESC."]
10590    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10591    pub temperature: [i16; 4],
10592    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
10593    pub index: u8,
10594    #[doc = "Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data."]
10595    pub count: u8,
10596    #[doc = "Connection type protocol for all ESC."]
10597    pub connection_type: EscConnectionType,
10598    #[doc = "Information regarding online/offline status of each ESC."]
10599    pub info: u8,
10600}
10601impl ESC_INFO_DATA {
10602    pub const ENCODED_LEN: usize = 46usize;
10603    pub const DEFAULT: Self = Self {
10604        time_usec: 0_u64,
10605        error_count: [0_u32; 4usize],
10606        counter: 0_u16,
10607        failure_flags: [0_u16; 4usize],
10608        temperature: [0_i16; 4usize],
10609        index: 0_u8,
10610        count: 0_u8,
10611        connection_type: EscConnectionType::DEFAULT,
10612        info: 0_u8,
10613    };
10614    #[cfg(feature = "arbitrary")]
10615    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10616        use arbitrary::{Arbitrary, Unstructured};
10617        let mut buf = [0u8; 1024];
10618        rng.fill_bytes(&mut buf);
10619        let mut unstructured = Unstructured::new(&buf);
10620        Self::arbitrary(&mut unstructured).unwrap_or_default()
10621    }
10622}
10623impl Default for ESC_INFO_DATA {
10624    fn default() -> Self {
10625        Self::DEFAULT.clone()
10626    }
10627}
10628impl MessageData for ESC_INFO_DATA {
10629    type Message = MavMessage;
10630    const ID: u32 = 290u32;
10631    const NAME: &'static str = "ESC_INFO";
10632    const EXTRA_CRC: u8 = 251u8;
10633    const ENCODED_LEN: usize = 46usize;
10634    fn deser(
10635        _version: MavlinkVersion,
10636        __input: &[u8],
10637    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10638        let avail_len = __input.len();
10639        let mut payload_buf = [0; Self::ENCODED_LEN];
10640        let mut buf = if avail_len < Self::ENCODED_LEN {
10641            payload_buf[0..avail_len].copy_from_slice(__input);
10642            Bytes::new(&payload_buf)
10643        } else {
10644            Bytes::new(__input)
10645        };
10646        let mut __struct = Self::default();
10647        __struct.time_usec = buf.get_u64_le();
10648        for v in &mut __struct.error_count {
10649            let val = buf.get_u32_le();
10650            *v = val;
10651        }
10652        __struct.counter = buf.get_u16_le();
10653        for v in &mut __struct.failure_flags {
10654            let val = buf.get_u16_le();
10655            *v = val;
10656        }
10657        for v in &mut __struct.temperature {
10658            let val = buf.get_i16_le();
10659            *v = val;
10660        }
10661        __struct.index = buf.get_u8();
10662        __struct.count = buf.get_u8();
10663        let tmp = buf.get_u8();
10664        __struct.connection_type =
10665            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10666                enum_type: "EscConnectionType",
10667                value: tmp as u32,
10668            })?;
10669        __struct.info = buf.get_u8();
10670        Ok(__struct)
10671    }
10672    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10673        let mut __tmp = BytesMut::new(bytes);
10674        #[allow(clippy::absurd_extreme_comparisons)]
10675        #[allow(unused_comparisons)]
10676        if __tmp.remaining() < Self::ENCODED_LEN {
10677            panic!(
10678                "buffer is too small (need {} bytes, but got {})",
10679                Self::ENCODED_LEN,
10680                __tmp.remaining(),
10681            )
10682        }
10683        __tmp.put_u64_le(self.time_usec);
10684        for val in &self.error_count {
10685            __tmp.put_u32_le(*val);
10686        }
10687        __tmp.put_u16_le(self.counter);
10688        for val in &self.failure_flags {
10689            __tmp.put_u16_le(*val);
10690        }
10691        for val in &self.temperature {
10692            __tmp.put_i16_le(*val);
10693        }
10694        __tmp.put_u8(self.index);
10695        __tmp.put_u8(self.count);
10696        __tmp.put_u8(self.connection_type as u8);
10697        __tmp.put_u8(self.info);
10698        if matches!(version, MavlinkVersion::V2) {
10699            let len = __tmp.len();
10700            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10701        } else {
10702            __tmp.len()
10703        }
10704    }
10705}
10706#[doc = "id: 291"]
10707#[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
10708#[derive(Debug, Clone, PartialEq)]
10709#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10710#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10711pub struct ESC_STATUS_DATA {
10712    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
10713    pub time_usec: u64,
10714    #[doc = "Reported motor RPM from each ESC (negative for reverse rotation)."]
10715    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10716    pub rpm: [i32; 4],
10717    #[doc = "Voltage measured from each ESC."]
10718    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10719    pub voltage: [f32; 4],
10720    #[doc = "Current measured from each ESC."]
10721    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10722    pub current: [f32; 4],
10723    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
10724    pub index: u8,
10725}
10726impl ESC_STATUS_DATA {
10727    pub const ENCODED_LEN: usize = 57usize;
10728    pub const DEFAULT: Self = Self {
10729        time_usec: 0_u64,
10730        rpm: [0_i32; 4usize],
10731        voltage: [0.0_f32; 4usize],
10732        current: [0.0_f32; 4usize],
10733        index: 0_u8,
10734    };
10735    #[cfg(feature = "arbitrary")]
10736    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10737        use arbitrary::{Arbitrary, Unstructured};
10738        let mut buf = [0u8; 1024];
10739        rng.fill_bytes(&mut buf);
10740        let mut unstructured = Unstructured::new(&buf);
10741        Self::arbitrary(&mut unstructured).unwrap_or_default()
10742    }
10743}
10744impl Default for ESC_STATUS_DATA {
10745    fn default() -> Self {
10746        Self::DEFAULT.clone()
10747    }
10748}
10749impl MessageData for ESC_STATUS_DATA {
10750    type Message = MavMessage;
10751    const ID: u32 = 291u32;
10752    const NAME: &'static str = "ESC_STATUS";
10753    const EXTRA_CRC: u8 = 10u8;
10754    const ENCODED_LEN: usize = 57usize;
10755    fn deser(
10756        _version: MavlinkVersion,
10757        __input: &[u8],
10758    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10759        let avail_len = __input.len();
10760        let mut payload_buf = [0; Self::ENCODED_LEN];
10761        let mut buf = if avail_len < Self::ENCODED_LEN {
10762            payload_buf[0..avail_len].copy_from_slice(__input);
10763            Bytes::new(&payload_buf)
10764        } else {
10765            Bytes::new(__input)
10766        };
10767        let mut __struct = Self::default();
10768        __struct.time_usec = buf.get_u64_le();
10769        for v in &mut __struct.rpm {
10770            let val = buf.get_i32_le();
10771            *v = val;
10772        }
10773        for v in &mut __struct.voltage {
10774            let val = buf.get_f32_le();
10775            *v = val;
10776        }
10777        for v in &mut __struct.current {
10778            let val = buf.get_f32_le();
10779            *v = val;
10780        }
10781        __struct.index = buf.get_u8();
10782        Ok(__struct)
10783    }
10784    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10785        let mut __tmp = BytesMut::new(bytes);
10786        #[allow(clippy::absurd_extreme_comparisons)]
10787        #[allow(unused_comparisons)]
10788        if __tmp.remaining() < Self::ENCODED_LEN {
10789            panic!(
10790                "buffer is too small (need {} bytes, but got {})",
10791                Self::ENCODED_LEN,
10792                __tmp.remaining(),
10793            )
10794        }
10795        __tmp.put_u64_le(self.time_usec);
10796        for val in &self.rpm {
10797            __tmp.put_i32_le(*val);
10798        }
10799        for val in &self.voltage {
10800            __tmp.put_f32_le(*val);
10801        }
10802        for val in &self.current {
10803            __tmp.put_f32_le(*val);
10804        }
10805        __tmp.put_u8(self.index);
10806        if matches!(version, MavlinkVersion::V2) {
10807            let len = __tmp.len();
10808            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10809        } else {
10810            __tmp.len()
10811        }
10812    }
10813}
10814#[doc = "id: 230"]
10815#[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
10816#[derive(Debug, Clone, PartialEq)]
10817#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10818#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10819pub struct ESTIMATOR_STATUS_DATA {
10820    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10821    pub time_usec: u64,
10822    #[doc = "Velocity innovation test ratio"]
10823    pub vel_ratio: f32,
10824    #[doc = "Horizontal position innovation test ratio"]
10825    pub pos_horiz_ratio: f32,
10826    #[doc = "Vertical position innovation test ratio"]
10827    pub pos_vert_ratio: f32,
10828    #[doc = "Magnetometer innovation test ratio"]
10829    pub mag_ratio: f32,
10830    #[doc = "Height above terrain innovation test ratio"]
10831    pub hagl_ratio: f32,
10832    #[doc = "True airspeed innovation test ratio"]
10833    pub tas_ratio: f32,
10834    #[doc = "Horizontal position 1-STD accuracy relative to the EKF local origin"]
10835    pub pos_horiz_accuracy: f32,
10836    #[doc = "Vertical position 1-STD accuracy relative to the EKF local origin"]
10837    pub pos_vert_accuracy: f32,
10838    #[doc = "Bitmap indicating which EKF outputs are valid."]
10839    pub flags: EstimatorStatusFlags,
10840}
10841impl ESTIMATOR_STATUS_DATA {
10842    pub const ENCODED_LEN: usize = 42usize;
10843    pub const DEFAULT: Self = Self {
10844        time_usec: 0_u64,
10845        vel_ratio: 0.0_f32,
10846        pos_horiz_ratio: 0.0_f32,
10847        pos_vert_ratio: 0.0_f32,
10848        mag_ratio: 0.0_f32,
10849        hagl_ratio: 0.0_f32,
10850        tas_ratio: 0.0_f32,
10851        pos_horiz_accuracy: 0.0_f32,
10852        pos_vert_accuracy: 0.0_f32,
10853        flags: EstimatorStatusFlags::DEFAULT,
10854    };
10855    #[cfg(feature = "arbitrary")]
10856    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10857        use arbitrary::{Arbitrary, Unstructured};
10858        let mut buf = [0u8; 1024];
10859        rng.fill_bytes(&mut buf);
10860        let mut unstructured = Unstructured::new(&buf);
10861        Self::arbitrary(&mut unstructured).unwrap_or_default()
10862    }
10863}
10864impl Default for ESTIMATOR_STATUS_DATA {
10865    fn default() -> Self {
10866        Self::DEFAULT.clone()
10867    }
10868}
10869impl MessageData for ESTIMATOR_STATUS_DATA {
10870    type Message = MavMessage;
10871    const ID: u32 = 230u32;
10872    const NAME: &'static str = "ESTIMATOR_STATUS";
10873    const EXTRA_CRC: u8 = 163u8;
10874    const ENCODED_LEN: usize = 42usize;
10875    fn deser(
10876        _version: MavlinkVersion,
10877        __input: &[u8],
10878    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10879        let avail_len = __input.len();
10880        let mut payload_buf = [0; Self::ENCODED_LEN];
10881        let mut buf = if avail_len < Self::ENCODED_LEN {
10882            payload_buf[0..avail_len].copy_from_slice(__input);
10883            Bytes::new(&payload_buf)
10884        } else {
10885            Bytes::new(__input)
10886        };
10887        let mut __struct = Self::default();
10888        __struct.time_usec = buf.get_u64_le();
10889        __struct.vel_ratio = buf.get_f32_le();
10890        __struct.pos_horiz_ratio = buf.get_f32_le();
10891        __struct.pos_vert_ratio = buf.get_f32_le();
10892        __struct.mag_ratio = buf.get_f32_le();
10893        __struct.hagl_ratio = buf.get_f32_le();
10894        __struct.tas_ratio = buf.get_f32_le();
10895        __struct.pos_horiz_accuracy = buf.get_f32_le();
10896        __struct.pos_vert_accuracy = buf.get_f32_le();
10897        let tmp = buf.get_u16_le();
10898        __struct.flags = EstimatorStatusFlags::from_bits(tmp & EstimatorStatusFlags::all().bits())
10899            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
10900                flag_type: "EstimatorStatusFlags",
10901                value: tmp as u32,
10902            })?;
10903        Ok(__struct)
10904    }
10905    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10906        let mut __tmp = BytesMut::new(bytes);
10907        #[allow(clippy::absurd_extreme_comparisons)]
10908        #[allow(unused_comparisons)]
10909        if __tmp.remaining() < Self::ENCODED_LEN {
10910            panic!(
10911                "buffer is too small (need {} bytes, but got {})",
10912                Self::ENCODED_LEN,
10913                __tmp.remaining(),
10914            )
10915        }
10916        __tmp.put_u64_le(self.time_usec);
10917        __tmp.put_f32_le(self.vel_ratio);
10918        __tmp.put_f32_le(self.pos_horiz_ratio);
10919        __tmp.put_f32_le(self.pos_vert_ratio);
10920        __tmp.put_f32_le(self.mag_ratio);
10921        __tmp.put_f32_le(self.hagl_ratio);
10922        __tmp.put_f32_le(self.tas_ratio);
10923        __tmp.put_f32_le(self.pos_horiz_accuracy);
10924        __tmp.put_f32_le(self.pos_vert_accuracy);
10925        __tmp.put_u16_le(self.flags.bits());
10926        if matches!(version, MavlinkVersion::V2) {
10927            let len = __tmp.len();
10928            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10929        } else {
10930            __tmp.len()
10931        }
10932    }
10933}
10934#[doc = "id: 410"]
10935#[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
10936#[derive(Debug, Clone, PartialEq)]
10937#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10938#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10939pub struct EVENT_DATA {
10940    #[doc = "Event ID (as defined in the component metadata)"]
10941    pub id: u32,
10942    #[doc = "Timestamp (time since system boot when the event happened)."]
10943    pub event_time_boot_ms: u32,
10944    #[doc = "Sequence number."]
10945    pub sequence: u16,
10946    #[doc = "Component ID"]
10947    pub destination_component: u8,
10948    #[doc = "System ID"]
10949    pub destination_system: u8,
10950    #[doc = "Log levels: 4 bits MSB: internal (for logging purposes), 4 bits LSB: external. Levels: Emergency = 0, Alert = 1, Critical = 2, Error = 3, Warning = 4, Notice = 5, Info = 6, Debug = 7, Protocol = 8, Disabled = 9"]
10951    pub log_levels: u8,
10952    #[doc = "Arguments (depend on event ID)."]
10953    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10954    pub arguments: [u8; 40],
10955}
10956impl EVENT_DATA {
10957    pub const ENCODED_LEN: usize = 53usize;
10958    pub const DEFAULT: Self = Self {
10959        id: 0_u32,
10960        event_time_boot_ms: 0_u32,
10961        sequence: 0_u16,
10962        destination_component: 0_u8,
10963        destination_system: 0_u8,
10964        log_levels: 0_u8,
10965        arguments: [0_u8; 40usize],
10966    };
10967    #[cfg(feature = "arbitrary")]
10968    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10969        use arbitrary::{Arbitrary, Unstructured};
10970        let mut buf = [0u8; 1024];
10971        rng.fill_bytes(&mut buf);
10972        let mut unstructured = Unstructured::new(&buf);
10973        Self::arbitrary(&mut unstructured).unwrap_or_default()
10974    }
10975}
10976impl Default for EVENT_DATA {
10977    fn default() -> Self {
10978        Self::DEFAULT.clone()
10979    }
10980}
10981impl MessageData for EVENT_DATA {
10982    type Message = MavMessage;
10983    const ID: u32 = 410u32;
10984    const NAME: &'static str = "EVENT";
10985    const EXTRA_CRC: u8 = 160u8;
10986    const ENCODED_LEN: usize = 53usize;
10987    fn deser(
10988        _version: MavlinkVersion,
10989        __input: &[u8],
10990    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10991        let avail_len = __input.len();
10992        let mut payload_buf = [0; Self::ENCODED_LEN];
10993        let mut buf = if avail_len < Self::ENCODED_LEN {
10994            payload_buf[0..avail_len].copy_from_slice(__input);
10995            Bytes::new(&payload_buf)
10996        } else {
10997            Bytes::new(__input)
10998        };
10999        let mut __struct = Self::default();
11000        __struct.id = buf.get_u32_le();
11001        __struct.event_time_boot_ms = buf.get_u32_le();
11002        __struct.sequence = buf.get_u16_le();
11003        __struct.destination_component = buf.get_u8();
11004        __struct.destination_system = buf.get_u8();
11005        __struct.log_levels = buf.get_u8();
11006        for v in &mut __struct.arguments {
11007            let val = buf.get_u8();
11008            *v = val;
11009        }
11010        Ok(__struct)
11011    }
11012    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11013        let mut __tmp = BytesMut::new(bytes);
11014        #[allow(clippy::absurd_extreme_comparisons)]
11015        #[allow(unused_comparisons)]
11016        if __tmp.remaining() < Self::ENCODED_LEN {
11017            panic!(
11018                "buffer is too small (need {} bytes, but got {})",
11019                Self::ENCODED_LEN,
11020                __tmp.remaining(),
11021            )
11022        }
11023        __tmp.put_u32_le(self.id);
11024        __tmp.put_u32_le(self.event_time_boot_ms);
11025        __tmp.put_u16_le(self.sequence);
11026        __tmp.put_u8(self.destination_component);
11027        __tmp.put_u8(self.destination_system);
11028        __tmp.put_u8(self.log_levels);
11029        for val in &self.arguments {
11030            __tmp.put_u8(*val);
11031        }
11032        if matches!(version, MavlinkVersion::V2) {
11033            let len = __tmp.len();
11034            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11035        } else {
11036            __tmp.len()
11037        }
11038    }
11039}
11040#[doc = "id: 245"]
11041#[doc = "Provides state for additional features."]
11042#[derive(Debug, Clone, PartialEq)]
11043#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11044#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11045pub struct EXTENDED_SYS_STATE_DATA {
11046    #[doc = "The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration."]
11047    pub vtol_state: MavVtolState,
11048    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
11049    pub landed_state: MavLandedState,
11050}
11051impl EXTENDED_SYS_STATE_DATA {
11052    pub const ENCODED_LEN: usize = 2usize;
11053    pub const DEFAULT: Self = Self {
11054        vtol_state: MavVtolState::DEFAULT,
11055        landed_state: MavLandedState::DEFAULT,
11056    };
11057    #[cfg(feature = "arbitrary")]
11058    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11059        use arbitrary::{Arbitrary, Unstructured};
11060        let mut buf = [0u8; 1024];
11061        rng.fill_bytes(&mut buf);
11062        let mut unstructured = Unstructured::new(&buf);
11063        Self::arbitrary(&mut unstructured).unwrap_or_default()
11064    }
11065}
11066impl Default for EXTENDED_SYS_STATE_DATA {
11067    fn default() -> Self {
11068        Self::DEFAULT.clone()
11069    }
11070}
11071impl MessageData for EXTENDED_SYS_STATE_DATA {
11072    type Message = MavMessage;
11073    const ID: u32 = 245u32;
11074    const NAME: &'static str = "EXTENDED_SYS_STATE";
11075    const EXTRA_CRC: u8 = 130u8;
11076    const ENCODED_LEN: usize = 2usize;
11077    fn deser(
11078        _version: MavlinkVersion,
11079        __input: &[u8],
11080    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11081        let avail_len = __input.len();
11082        let mut payload_buf = [0; Self::ENCODED_LEN];
11083        let mut buf = if avail_len < Self::ENCODED_LEN {
11084            payload_buf[0..avail_len].copy_from_slice(__input);
11085            Bytes::new(&payload_buf)
11086        } else {
11087            Bytes::new(__input)
11088        };
11089        let mut __struct = Self::default();
11090        let tmp = buf.get_u8();
11091        __struct.vtol_state =
11092            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11093                enum_type: "MavVtolState",
11094                value: tmp as u32,
11095            })?;
11096        let tmp = buf.get_u8();
11097        __struct.landed_state =
11098            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11099                enum_type: "MavLandedState",
11100                value: tmp as u32,
11101            })?;
11102        Ok(__struct)
11103    }
11104    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11105        let mut __tmp = BytesMut::new(bytes);
11106        #[allow(clippy::absurd_extreme_comparisons)]
11107        #[allow(unused_comparisons)]
11108        if __tmp.remaining() < Self::ENCODED_LEN {
11109            panic!(
11110                "buffer is too small (need {} bytes, but got {})",
11111                Self::ENCODED_LEN,
11112                __tmp.remaining(),
11113            )
11114        }
11115        __tmp.put_u8(self.vtol_state as u8);
11116        __tmp.put_u8(self.landed_state as u8);
11117        if matches!(version, MavlinkVersion::V2) {
11118            let len = __tmp.len();
11119            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11120        } else {
11121            __tmp.len()
11122        }
11123    }
11124}
11125#[doc = "id: 162"]
11126#[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
11127#[derive(Debug, Clone, PartialEq)]
11128#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11129#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11130pub struct FENCE_STATUS_DATA {
11131    #[doc = "Time (since boot) of last breach."]
11132    pub breach_time: u32,
11133    #[doc = "Number of fence breaches."]
11134    pub breach_count: u16,
11135    #[doc = "Breach status (0 if currently inside fence, 1 if outside)."]
11136    pub breach_status: u8,
11137    #[doc = "Last breach type."]
11138    pub breach_type: FenceBreach,
11139    #[doc = "Active action to prevent fence breach"]
11140    #[cfg_attr(feature = "serde", serde(default))]
11141    pub breach_mitigation: FenceMitigate,
11142}
11143impl FENCE_STATUS_DATA {
11144    pub const ENCODED_LEN: usize = 9usize;
11145    pub const DEFAULT: Self = Self {
11146        breach_time: 0_u32,
11147        breach_count: 0_u16,
11148        breach_status: 0_u8,
11149        breach_type: FenceBreach::DEFAULT,
11150        breach_mitigation: FenceMitigate::DEFAULT,
11151    };
11152    #[cfg(feature = "arbitrary")]
11153    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11154        use arbitrary::{Arbitrary, Unstructured};
11155        let mut buf = [0u8; 1024];
11156        rng.fill_bytes(&mut buf);
11157        let mut unstructured = Unstructured::new(&buf);
11158        Self::arbitrary(&mut unstructured).unwrap_or_default()
11159    }
11160}
11161impl Default for FENCE_STATUS_DATA {
11162    fn default() -> Self {
11163        Self::DEFAULT.clone()
11164    }
11165}
11166impl MessageData for FENCE_STATUS_DATA {
11167    type Message = MavMessage;
11168    const ID: u32 = 162u32;
11169    const NAME: &'static str = "FENCE_STATUS";
11170    const EXTRA_CRC: u8 = 189u8;
11171    const ENCODED_LEN: usize = 9usize;
11172    fn deser(
11173        _version: MavlinkVersion,
11174        __input: &[u8],
11175    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11176        let avail_len = __input.len();
11177        let mut payload_buf = [0; Self::ENCODED_LEN];
11178        let mut buf = if avail_len < Self::ENCODED_LEN {
11179            payload_buf[0..avail_len].copy_from_slice(__input);
11180            Bytes::new(&payload_buf)
11181        } else {
11182            Bytes::new(__input)
11183        };
11184        let mut __struct = Self::default();
11185        __struct.breach_time = buf.get_u32_le();
11186        __struct.breach_count = buf.get_u16_le();
11187        __struct.breach_status = buf.get_u8();
11188        let tmp = buf.get_u8();
11189        __struct.breach_type =
11190            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11191                enum_type: "FenceBreach",
11192                value: tmp as u32,
11193            })?;
11194        let tmp = buf.get_u8();
11195        __struct.breach_mitigation =
11196            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11197                enum_type: "FenceMitigate",
11198                value: tmp as u32,
11199            })?;
11200        Ok(__struct)
11201    }
11202    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11203        let mut __tmp = BytesMut::new(bytes);
11204        #[allow(clippy::absurd_extreme_comparisons)]
11205        #[allow(unused_comparisons)]
11206        if __tmp.remaining() < Self::ENCODED_LEN {
11207            panic!(
11208                "buffer is too small (need {} bytes, but got {})",
11209                Self::ENCODED_LEN,
11210                __tmp.remaining(),
11211            )
11212        }
11213        __tmp.put_u32_le(self.breach_time);
11214        __tmp.put_u16_le(self.breach_count);
11215        __tmp.put_u8(self.breach_status);
11216        __tmp.put_u8(self.breach_type as u8);
11217        __tmp.put_u8(self.breach_mitigation as u8);
11218        if matches!(version, MavlinkVersion::V2) {
11219            let len = __tmp.len();
11220            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11221        } else {
11222            __tmp.len()
11223        }
11224    }
11225}
11226#[doc = "id: 110"]
11227#[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
11228#[derive(Debug, Clone, PartialEq)]
11229#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11230#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11231pub struct FILE_TRANSFER_PROTOCOL_DATA {
11232    #[doc = "Network ID (0 for broadcast)"]
11233    pub target_network: u8,
11234    #[doc = "System ID (0 for broadcast)"]
11235    pub target_system: u8,
11236    #[doc = "Component ID (0 for broadcast)"]
11237    pub target_component: u8,
11238    #[doc = "Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The content/format of this block is defined in <https://mavlink.io/en/services/ftp.html>."]
11239    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11240    pub payload: [u8; 251],
11241}
11242impl FILE_TRANSFER_PROTOCOL_DATA {
11243    pub const ENCODED_LEN: usize = 254usize;
11244    pub const DEFAULT: Self = Self {
11245        target_network: 0_u8,
11246        target_system: 0_u8,
11247        target_component: 0_u8,
11248        payload: [0_u8; 251usize],
11249    };
11250    #[cfg(feature = "arbitrary")]
11251    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11252        use arbitrary::{Arbitrary, Unstructured};
11253        let mut buf = [0u8; 1024];
11254        rng.fill_bytes(&mut buf);
11255        let mut unstructured = Unstructured::new(&buf);
11256        Self::arbitrary(&mut unstructured).unwrap_or_default()
11257    }
11258}
11259impl Default for FILE_TRANSFER_PROTOCOL_DATA {
11260    fn default() -> Self {
11261        Self::DEFAULT.clone()
11262    }
11263}
11264impl MessageData for FILE_TRANSFER_PROTOCOL_DATA {
11265    type Message = MavMessage;
11266    const ID: u32 = 110u32;
11267    const NAME: &'static str = "FILE_TRANSFER_PROTOCOL";
11268    const EXTRA_CRC: u8 = 84u8;
11269    const ENCODED_LEN: usize = 254usize;
11270    fn deser(
11271        _version: MavlinkVersion,
11272        __input: &[u8],
11273    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11274        let avail_len = __input.len();
11275        let mut payload_buf = [0; Self::ENCODED_LEN];
11276        let mut buf = if avail_len < Self::ENCODED_LEN {
11277            payload_buf[0..avail_len].copy_from_slice(__input);
11278            Bytes::new(&payload_buf)
11279        } else {
11280            Bytes::new(__input)
11281        };
11282        let mut __struct = Self::default();
11283        __struct.target_network = buf.get_u8();
11284        __struct.target_system = buf.get_u8();
11285        __struct.target_component = buf.get_u8();
11286        for v in &mut __struct.payload {
11287            let val = buf.get_u8();
11288            *v = val;
11289        }
11290        Ok(__struct)
11291    }
11292    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11293        let mut __tmp = BytesMut::new(bytes);
11294        #[allow(clippy::absurd_extreme_comparisons)]
11295        #[allow(unused_comparisons)]
11296        if __tmp.remaining() < Self::ENCODED_LEN {
11297            panic!(
11298                "buffer is too small (need {} bytes, but got {})",
11299                Self::ENCODED_LEN,
11300                __tmp.remaining(),
11301            )
11302        }
11303        __tmp.put_u8(self.target_network);
11304        __tmp.put_u8(self.target_system);
11305        __tmp.put_u8(self.target_component);
11306        for val in &self.payload {
11307            __tmp.put_u8(*val);
11308        }
11309        if matches!(version, MavlinkVersion::V2) {
11310            let len = __tmp.len();
11311            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11312        } else {
11313            __tmp.len()
11314        }
11315    }
11316}
11317#[doc = "id: 264"]
11318#[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
11319#[derive(Debug, Clone, PartialEq)]
11320#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11321#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11322pub struct FLIGHT_INFORMATION_DATA {
11323    #[doc = "Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC."]
11324    pub arming_time_utc: u64,
11325    #[doc = "Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC."]
11326    pub takeoff_time_utc: u64,
11327    #[doc = "Flight number. Note, field is misnamed UUID."]
11328    pub flight_uuid: u64,
11329    #[doc = "Timestamp (time since system boot)."]
11330    pub time_boot_ms: u32,
11331    #[doc = "Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming."]
11332    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11333    pub landing_time: u32,
11334}
11335impl FLIGHT_INFORMATION_DATA {
11336    pub const ENCODED_LEN: usize = 32usize;
11337    pub const DEFAULT: Self = Self {
11338        arming_time_utc: 0_u64,
11339        takeoff_time_utc: 0_u64,
11340        flight_uuid: 0_u64,
11341        time_boot_ms: 0_u32,
11342        landing_time: 0_u32,
11343    };
11344    #[cfg(feature = "arbitrary")]
11345    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11346        use arbitrary::{Arbitrary, Unstructured};
11347        let mut buf = [0u8; 1024];
11348        rng.fill_bytes(&mut buf);
11349        let mut unstructured = Unstructured::new(&buf);
11350        Self::arbitrary(&mut unstructured).unwrap_or_default()
11351    }
11352}
11353impl Default for FLIGHT_INFORMATION_DATA {
11354    fn default() -> Self {
11355        Self::DEFAULT.clone()
11356    }
11357}
11358impl MessageData for FLIGHT_INFORMATION_DATA {
11359    type Message = MavMessage;
11360    const ID: u32 = 264u32;
11361    const NAME: &'static str = "FLIGHT_INFORMATION";
11362    const EXTRA_CRC: u8 = 49u8;
11363    const ENCODED_LEN: usize = 32usize;
11364    fn deser(
11365        _version: MavlinkVersion,
11366        __input: &[u8],
11367    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11368        let avail_len = __input.len();
11369        let mut payload_buf = [0; Self::ENCODED_LEN];
11370        let mut buf = if avail_len < Self::ENCODED_LEN {
11371            payload_buf[0..avail_len].copy_from_slice(__input);
11372            Bytes::new(&payload_buf)
11373        } else {
11374            Bytes::new(__input)
11375        };
11376        let mut __struct = Self::default();
11377        __struct.arming_time_utc = buf.get_u64_le();
11378        __struct.takeoff_time_utc = buf.get_u64_le();
11379        __struct.flight_uuid = buf.get_u64_le();
11380        __struct.time_boot_ms = buf.get_u32_le();
11381        __struct.landing_time = buf.get_u32_le();
11382        Ok(__struct)
11383    }
11384    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11385        let mut __tmp = BytesMut::new(bytes);
11386        #[allow(clippy::absurd_extreme_comparisons)]
11387        #[allow(unused_comparisons)]
11388        if __tmp.remaining() < Self::ENCODED_LEN {
11389            panic!(
11390                "buffer is too small (need {} bytes, but got {})",
11391                Self::ENCODED_LEN,
11392                __tmp.remaining(),
11393            )
11394        }
11395        __tmp.put_u64_le(self.arming_time_utc);
11396        __tmp.put_u64_le(self.takeoff_time_utc);
11397        __tmp.put_u64_le(self.flight_uuid);
11398        __tmp.put_u32_le(self.time_boot_ms);
11399        __tmp.put_u32_le(self.landing_time);
11400        if matches!(version, MavlinkVersion::V2) {
11401            let len = __tmp.len();
11402            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11403        } else {
11404            __tmp.len()
11405        }
11406    }
11407}
11408#[doc = "id: 144"]
11409#[doc = "Current motion information from a designated system."]
11410#[derive(Debug, Clone, PartialEq)]
11411#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11412#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11413pub struct FOLLOW_TARGET_DATA {
11414    #[doc = "Timestamp (time since system boot)."]
11415    pub timestamp: u64,
11416    #[doc = "button states or switches of a tracker device"]
11417    pub custom_state: u64,
11418    #[doc = "Latitude (WGS84)"]
11419    pub lat: i32,
11420    #[doc = "Longitude (WGS84)"]
11421    pub lon: i32,
11422    #[doc = "Altitude (MSL)"]
11423    pub alt: f32,
11424    #[doc = "target velocity (0,0,0) for unknown"]
11425    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11426    pub vel: [f32; 3],
11427    #[doc = "linear target acceleration (0,0,0) for unknown"]
11428    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11429    pub acc: [f32; 3],
11430    #[doc = "(0 0 0 0 for unknown)"]
11431    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11432    pub attitude_q: [f32; 4],
11433    #[doc = "(0 0 0 for unknown)"]
11434    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11435    pub rates: [f32; 3],
11436    #[doc = "eph epv"]
11437    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11438    pub position_cov: [f32; 3],
11439    #[doc = "bit positions for tracker reporting capabilities (POS = 0, VEL = 1, ACCEL = 2, ATT + RATES = 3)"]
11440    pub est_capabilities: u8,
11441}
11442impl FOLLOW_TARGET_DATA {
11443    pub const ENCODED_LEN: usize = 93usize;
11444    pub const DEFAULT: Self = Self {
11445        timestamp: 0_u64,
11446        custom_state: 0_u64,
11447        lat: 0_i32,
11448        lon: 0_i32,
11449        alt: 0.0_f32,
11450        vel: [0.0_f32; 3usize],
11451        acc: [0.0_f32; 3usize],
11452        attitude_q: [0.0_f32; 4usize],
11453        rates: [0.0_f32; 3usize],
11454        position_cov: [0.0_f32; 3usize],
11455        est_capabilities: 0_u8,
11456    };
11457    #[cfg(feature = "arbitrary")]
11458    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11459        use arbitrary::{Arbitrary, Unstructured};
11460        let mut buf = [0u8; 1024];
11461        rng.fill_bytes(&mut buf);
11462        let mut unstructured = Unstructured::new(&buf);
11463        Self::arbitrary(&mut unstructured).unwrap_or_default()
11464    }
11465}
11466impl Default for FOLLOW_TARGET_DATA {
11467    fn default() -> Self {
11468        Self::DEFAULT.clone()
11469    }
11470}
11471impl MessageData for FOLLOW_TARGET_DATA {
11472    type Message = MavMessage;
11473    const ID: u32 = 144u32;
11474    const NAME: &'static str = "FOLLOW_TARGET";
11475    const EXTRA_CRC: u8 = 127u8;
11476    const ENCODED_LEN: usize = 93usize;
11477    fn deser(
11478        _version: MavlinkVersion,
11479        __input: &[u8],
11480    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11481        let avail_len = __input.len();
11482        let mut payload_buf = [0; Self::ENCODED_LEN];
11483        let mut buf = if avail_len < Self::ENCODED_LEN {
11484            payload_buf[0..avail_len].copy_from_slice(__input);
11485            Bytes::new(&payload_buf)
11486        } else {
11487            Bytes::new(__input)
11488        };
11489        let mut __struct = Self::default();
11490        __struct.timestamp = buf.get_u64_le();
11491        __struct.custom_state = buf.get_u64_le();
11492        __struct.lat = buf.get_i32_le();
11493        __struct.lon = buf.get_i32_le();
11494        __struct.alt = buf.get_f32_le();
11495        for v in &mut __struct.vel {
11496            let val = buf.get_f32_le();
11497            *v = val;
11498        }
11499        for v in &mut __struct.acc {
11500            let val = buf.get_f32_le();
11501            *v = val;
11502        }
11503        for v in &mut __struct.attitude_q {
11504            let val = buf.get_f32_le();
11505            *v = val;
11506        }
11507        for v in &mut __struct.rates {
11508            let val = buf.get_f32_le();
11509            *v = val;
11510        }
11511        for v in &mut __struct.position_cov {
11512            let val = buf.get_f32_le();
11513            *v = val;
11514        }
11515        __struct.est_capabilities = buf.get_u8();
11516        Ok(__struct)
11517    }
11518    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11519        let mut __tmp = BytesMut::new(bytes);
11520        #[allow(clippy::absurd_extreme_comparisons)]
11521        #[allow(unused_comparisons)]
11522        if __tmp.remaining() < Self::ENCODED_LEN {
11523            panic!(
11524                "buffer is too small (need {} bytes, but got {})",
11525                Self::ENCODED_LEN,
11526                __tmp.remaining(),
11527            )
11528        }
11529        __tmp.put_u64_le(self.timestamp);
11530        __tmp.put_u64_le(self.custom_state);
11531        __tmp.put_i32_le(self.lat);
11532        __tmp.put_i32_le(self.lon);
11533        __tmp.put_f32_le(self.alt);
11534        for val in &self.vel {
11535            __tmp.put_f32_le(*val);
11536        }
11537        for val in &self.acc {
11538            __tmp.put_f32_le(*val);
11539        }
11540        for val in &self.attitude_q {
11541            __tmp.put_f32_le(*val);
11542        }
11543        for val in &self.rates {
11544            __tmp.put_f32_le(*val);
11545        }
11546        for val in &self.position_cov {
11547            __tmp.put_f32_le(*val);
11548        }
11549        __tmp.put_u8(self.est_capabilities);
11550        if matches!(version, MavlinkVersion::V2) {
11551            let len = __tmp.len();
11552            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11553        } else {
11554            __tmp.len()
11555        }
11556    }
11557}
11558#[doc = "id: 371"]
11559#[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
11560#[derive(Debug, Clone, PartialEq)]
11561#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11562#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11563pub struct FUEL_STATUS_DATA {
11564    #[doc = "Capacity when full. Must be provided."]
11565    pub maximum_fuel: f32,
11566    #[doc = "Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided."]
11567    pub consumed_fuel: f32,
11568    #[doc = "Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided."]
11569    pub remaining_fuel: f32,
11570    #[doc = "Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided."]
11571    pub flow_rate: f32,
11572    #[doc = "Fuel temperature. NaN: field not provided."]
11573    pub temperature: f32,
11574    #[doc = "Fuel type. Defines units for fuel capacity and consumption fields above."]
11575    pub fuel_type: MavFuelType,
11576    #[doc = "Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2."]
11577    pub id: u8,
11578    #[doc = "Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided."]
11579    pub percent_remaining: u8,
11580}
11581impl FUEL_STATUS_DATA {
11582    pub const ENCODED_LEN: usize = 26usize;
11583    pub const DEFAULT: Self = Self {
11584        maximum_fuel: 0.0_f32,
11585        consumed_fuel: 0.0_f32,
11586        remaining_fuel: 0.0_f32,
11587        flow_rate: 0.0_f32,
11588        temperature: 0.0_f32,
11589        fuel_type: MavFuelType::DEFAULT,
11590        id: 0_u8,
11591        percent_remaining: 0_u8,
11592    };
11593    #[cfg(feature = "arbitrary")]
11594    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11595        use arbitrary::{Arbitrary, Unstructured};
11596        let mut buf = [0u8; 1024];
11597        rng.fill_bytes(&mut buf);
11598        let mut unstructured = Unstructured::new(&buf);
11599        Self::arbitrary(&mut unstructured).unwrap_or_default()
11600    }
11601}
11602impl Default for FUEL_STATUS_DATA {
11603    fn default() -> Self {
11604        Self::DEFAULT.clone()
11605    }
11606}
11607impl MessageData for FUEL_STATUS_DATA {
11608    type Message = MavMessage;
11609    const ID: u32 = 371u32;
11610    const NAME: &'static str = "FUEL_STATUS";
11611    const EXTRA_CRC: u8 = 10u8;
11612    const ENCODED_LEN: usize = 26usize;
11613    fn deser(
11614        _version: MavlinkVersion,
11615        __input: &[u8],
11616    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11617        let avail_len = __input.len();
11618        let mut payload_buf = [0; Self::ENCODED_LEN];
11619        let mut buf = if avail_len < Self::ENCODED_LEN {
11620            payload_buf[0..avail_len].copy_from_slice(__input);
11621            Bytes::new(&payload_buf)
11622        } else {
11623            Bytes::new(__input)
11624        };
11625        let mut __struct = Self::default();
11626        __struct.maximum_fuel = buf.get_f32_le();
11627        __struct.consumed_fuel = buf.get_f32_le();
11628        __struct.remaining_fuel = buf.get_f32_le();
11629        __struct.flow_rate = buf.get_f32_le();
11630        __struct.temperature = buf.get_f32_le();
11631        let tmp = buf.get_u32_le();
11632        __struct.fuel_type = FromPrimitive::from_u32(tmp).ok_or(
11633            ::mavlink_core::error::ParserError::InvalidEnum {
11634                enum_type: "MavFuelType",
11635                value: tmp as u32,
11636            },
11637        )?;
11638        __struct.id = buf.get_u8();
11639        __struct.percent_remaining = buf.get_u8();
11640        Ok(__struct)
11641    }
11642    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11643        let mut __tmp = BytesMut::new(bytes);
11644        #[allow(clippy::absurd_extreme_comparisons)]
11645        #[allow(unused_comparisons)]
11646        if __tmp.remaining() < Self::ENCODED_LEN {
11647            panic!(
11648                "buffer is too small (need {} bytes, but got {})",
11649                Self::ENCODED_LEN,
11650                __tmp.remaining(),
11651            )
11652        }
11653        __tmp.put_f32_le(self.maximum_fuel);
11654        __tmp.put_f32_le(self.consumed_fuel);
11655        __tmp.put_f32_le(self.remaining_fuel);
11656        __tmp.put_f32_le(self.flow_rate);
11657        __tmp.put_f32_le(self.temperature);
11658        __tmp.put_u32_le(self.fuel_type as u32);
11659        __tmp.put_u8(self.id);
11660        __tmp.put_u8(self.percent_remaining);
11661        if matches!(version, MavlinkVersion::V2) {
11662            let len = __tmp.len();
11663            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11664        } else {
11665            __tmp.len()
11666        }
11667    }
11668}
11669#[doc = "id: 373"]
11670#[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
11671#[derive(Debug, Clone, PartialEq)]
11672#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11673#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11674pub struct GENERATOR_STATUS_DATA {
11675    #[doc = "Status flags."]
11676    pub status: MavGeneratorStatusFlag,
11677    #[doc = "Current into/out of battery. Positive for out. Negative for in. NaN: field not provided."]
11678    pub battery_current: f32,
11679    #[doc = "Current going to the UAV. If battery current not available this is the DC current from the generator. Positive for out. Negative for in. NaN: field not provided"]
11680    pub load_current: f32,
11681    #[doc = "The power being generated. NaN: field not provided"]
11682    pub power_generated: f32,
11683    #[doc = "Voltage of the bus seen at the generator, or battery bus if battery bus is controlled by generator and at a different voltage to main bus."]
11684    pub bus_voltage: f32,
11685    #[doc = "The target battery current. Positive for out. Negative for in. NaN: field not provided"]
11686    pub bat_current_setpoint: f32,
11687    #[doc = "Seconds this generator has run since it was rebooted. UINT32_MAX: field not provided."]
11688    pub runtime: u32,
11689    #[doc = "Seconds until this generator requires maintenance.  A negative value indicates maintenance is past-due. INT32_MAX: field not provided."]
11690    pub time_until_maintenance: i32,
11691    #[doc = "Speed of electrical generator or alternator. UINT16_MAX: field not provided."]
11692    pub generator_speed: u16,
11693    #[doc = "The temperature of the rectifier or power converter. INT16_MAX: field not provided."]
11694    pub rectifier_temperature: i16,
11695    #[doc = "The temperature of the mechanical motor, fuel cell core or generator. INT16_MAX: field not provided."]
11696    pub generator_temperature: i16,
11697}
11698impl GENERATOR_STATUS_DATA {
11699    pub const ENCODED_LEN: usize = 42usize;
11700    pub const DEFAULT: Self = Self {
11701        status: MavGeneratorStatusFlag::DEFAULT,
11702        battery_current: 0.0_f32,
11703        load_current: 0.0_f32,
11704        power_generated: 0.0_f32,
11705        bus_voltage: 0.0_f32,
11706        bat_current_setpoint: 0.0_f32,
11707        runtime: 0_u32,
11708        time_until_maintenance: 0_i32,
11709        generator_speed: 0_u16,
11710        rectifier_temperature: 0_i16,
11711        generator_temperature: 0_i16,
11712    };
11713    #[cfg(feature = "arbitrary")]
11714    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11715        use arbitrary::{Arbitrary, Unstructured};
11716        let mut buf = [0u8; 1024];
11717        rng.fill_bytes(&mut buf);
11718        let mut unstructured = Unstructured::new(&buf);
11719        Self::arbitrary(&mut unstructured).unwrap_or_default()
11720    }
11721}
11722impl Default for GENERATOR_STATUS_DATA {
11723    fn default() -> Self {
11724        Self::DEFAULT.clone()
11725    }
11726}
11727impl MessageData for GENERATOR_STATUS_DATA {
11728    type Message = MavMessage;
11729    const ID: u32 = 373u32;
11730    const NAME: &'static str = "GENERATOR_STATUS";
11731    const EXTRA_CRC: u8 = 117u8;
11732    const ENCODED_LEN: usize = 42usize;
11733    fn deser(
11734        _version: MavlinkVersion,
11735        __input: &[u8],
11736    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11737        let avail_len = __input.len();
11738        let mut payload_buf = [0; Self::ENCODED_LEN];
11739        let mut buf = if avail_len < Self::ENCODED_LEN {
11740            payload_buf[0..avail_len].copy_from_slice(__input);
11741            Bytes::new(&payload_buf)
11742        } else {
11743            Bytes::new(__input)
11744        };
11745        let mut __struct = Self::default();
11746        let tmp = buf.get_u64_le();
11747        __struct.status = MavGeneratorStatusFlag::from_bits(
11748            tmp & MavGeneratorStatusFlag::all().bits(),
11749        )
11750        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11751            flag_type: "MavGeneratorStatusFlag",
11752            value: tmp as u32,
11753        })?;
11754        __struct.battery_current = buf.get_f32_le();
11755        __struct.load_current = buf.get_f32_le();
11756        __struct.power_generated = buf.get_f32_le();
11757        __struct.bus_voltage = buf.get_f32_le();
11758        __struct.bat_current_setpoint = buf.get_f32_le();
11759        __struct.runtime = buf.get_u32_le();
11760        __struct.time_until_maintenance = buf.get_i32_le();
11761        __struct.generator_speed = buf.get_u16_le();
11762        __struct.rectifier_temperature = buf.get_i16_le();
11763        __struct.generator_temperature = buf.get_i16_le();
11764        Ok(__struct)
11765    }
11766    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11767        let mut __tmp = BytesMut::new(bytes);
11768        #[allow(clippy::absurd_extreme_comparisons)]
11769        #[allow(unused_comparisons)]
11770        if __tmp.remaining() < Self::ENCODED_LEN {
11771            panic!(
11772                "buffer is too small (need {} bytes, but got {})",
11773                Self::ENCODED_LEN,
11774                __tmp.remaining(),
11775            )
11776        }
11777        __tmp.put_u64_le(self.status.bits());
11778        __tmp.put_f32_le(self.battery_current);
11779        __tmp.put_f32_le(self.load_current);
11780        __tmp.put_f32_le(self.power_generated);
11781        __tmp.put_f32_le(self.bus_voltage);
11782        __tmp.put_f32_le(self.bat_current_setpoint);
11783        __tmp.put_u32_le(self.runtime);
11784        __tmp.put_i32_le(self.time_until_maintenance);
11785        __tmp.put_u16_le(self.generator_speed);
11786        __tmp.put_i16_le(self.rectifier_temperature);
11787        __tmp.put_i16_le(self.generator_temperature);
11788        if matches!(version, MavlinkVersion::V2) {
11789            let len = __tmp.len();
11790            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11791        } else {
11792            __tmp.len()
11793        }
11794    }
11795}
11796#[doc = "id: 285"]
11797#[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
11798#[derive(Debug, Clone, PartialEq)]
11799#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11800#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11801pub struct GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
11802    #[doc = "Timestamp (time since system boot)."]
11803    pub time_boot_ms: u32,
11804    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description."]
11805    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11806    pub q: [f32; 4],
11807    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN if unknown."]
11808    pub angular_velocity_x: f32,
11809    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN if unknown."]
11810    pub angular_velocity_y: f32,
11811    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN if unknown."]
11812    pub angular_velocity_z: f32,
11813    #[doc = "Failure flags (0 for no failure)"]
11814    pub failure_flags: GimbalDeviceErrorFlags,
11815    #[doc = "Current gimbal flags set."]
11816    pub flags: GimbalDeviceFlags,
11817    #[doc = "System ID"]
11818    pub target_system: u8,
11819    #[doc = "Component ID"]
11820    pub target_component: u8,
11821    #[doc = "Yaw angle relating the quaternions in earth and body frames (see message description). NaN if unknown."]
11822    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11823    pub delta_yaw: f32,
11824    #[doc = "Yaw angular velocity relating the angular velocities in earth and body frames (see message description). NaN if unknown."]
11825    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11826    pub delta_yaw_velocity: f32,
11827    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
11828    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11829    pub gimbal_device_id: u8,
11830}
11831impl GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
11832    pub const ENCODED_LEN: usize = 49usize;
11833    pub const DEFAULT: Self = Self {
11834        time_boot_ms: 0_u32,
11835        q: [0.0_f32; 4usize],
11836        angular_velocity_x: 0.0_f32,
11837        angular_velocity_y: 0.0_f32,
11838        angular_velocity_z: 0.0_f32,
11839        failure_flags: GimbalDeviceErrorFlags::DEFAULT,
11840        flags: GimbalDeviceFlags::DEFAULT,
11841        target_system: 0_u8,
11842        target_component: 0_u8,
11843        delta_yaw: 0.0_f32,
11844        delta_yaw_velocity: 0.0_f32,
11845        gimbal_device_id: 0_u8,
11846    };
11847    #[cfg(feature = "arbitrary")]
11848    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11849        use arbitrary::{Arbitrary, Unstructured};
11850        let mut buf = [0u8; 1024];
11851        rng.fill_bytes(&mut buf);
11852        let mut unstructured = Unstructured::new(&buf);
11853        Self::arbitrary(&mut unstructured).unwrap_or_default()
11854    }
11855}
11856impl Default for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
11857    fn default() -> Self {
11858        Self::DEFAULT.clone()
11859    }
11860}
11861impl MessageData for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
11862    type Message = MavMessage;
11863    const ID: u32 = 285u32;
11864    const NAME: &'static str = "GIMBAL_DEVICE_ATTITUDE_STATUS";
11865    const EXTRA_CRC: u8 = 137u8;
11866    const ENCODED_LEN: usize = 49usize;
11867    fn deser(
11868        _version: MavlinkVersion,
11869        __input: &[u8],
11870    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11871        let avail_len = __input.len();
11872        let mut payload_buf = [0; Self::ENCODED_LEN];
11873        let mut buf = if avail_len < Self::ENCODED_LEN {
11874            payload_buf[0..avail_len].copy_from_slice(__input);
11875            Bytes::new(&payload_buf)
11876        } else {
11877            Bytes::new(__input)
11878        };
11879        let mut __struct = Self::default();
11880        __struct.time_boot_ms = buf.get_u32_le();
11881        for v in &mut __struct.q {
11882            let val = buf.get_f32_le();
11883            *v = val;
11884        }
11885        __struct.angular_velocity_x = buf.get_f32_le();
11886        __struct.angular_velocity_y = buf.get_f32_le();
11887        __struct.angular_velocity_z = buf.get_f32_le();
11888        let tmp = buf.get_u32_le();
11889        __struct.failure_flags = GimbalDeviceErrorFlags::from_bits(
11890            tmp & GimbalDeviceErrorFlags::all().bits(),
11891        )
11892        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11893            flag_type: "GimbalDeviceErrorFlags",
11894            value: tmp as u32,
11895        })?;
11896        let tmp = buf.get_u16_le();
11897        __struct.flags = GimbalDeviceFlags::from_bits(tmp & GimbalDeviceFlags::all().bits())
11898            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11899                flag_type: "GimbalDeviceFlags",
11900                value: tmp as u32,
11901            })?;
11902        __struct.target_system = buf.get_u8();
11903        __struct.target_component = buf.get_u8();
11904        __struct.delta_yaw = buf.get_f32_le();
11905        __struct.delta_yaw_velocity = buf.get_f32_le();
11906        __struct.gimbal_device_id = buf.get_u8();
11907        Ok(__struct)
11908    }
11909    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11910        let mut __tmp = BytesMut::new(bytes);
11911        #[allow(clippy::absurd_extreme_comparisons)]
11912        #[allow(unused_comparisons)]
11913        if __tmp.remaining() < Self::ENCODED_LEN {
11914            panic!(
11915                "buffer is too small (need {} bytes, but got {})",
11916                Self::ENCODED_LEN,
11917                __tmp.remaining(),
11918            )
11919        }
11920        __tmp.put_u32_le(self.time_boot_ms);
11921        for val in &self.q {
11922            __tmp.put_f32_le(*val);
11923        }
11924        __tmp.put_f32_le(self.angular_velocity_x);
11925        __tmp.put_f32_le(self.angular_velocity_y);
11926        __tmp.put_f32_le(self.angular_velocity_z);
11927        __tmp.put_u32_le(self.failure_flags.bits());
11928        __tmp.put_u16_le(self.flags.bits());
11929        __tmp.put_u8(self.target_system);
11930        __tmp.put_u8(self.target_component);
11931        __tmp.put_f32_le(self.delta_yaw);
11932        __tmp.put_f32_le(self.delta_yaw_velocity);
11933        __tmp.put_u8(self.gimbal_device_id);
11934        if matches!(version, MavlinkVersion::V2) {
11935            let len = __tmp.len();
11936            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11937        } else {
11938            __tmp.len()
11939        }
11940    }
11941}
11942#[doc = "id: 283"]
11943#[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
11944#[derive(Debug, Clone, PartialEq)]
11945#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11946#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11947pub struct GIMBAL_DEVICE_INFORMATION_DATA {
11948    #[doc = "UID of gimbal hardware (0 if unknown)."]
11949    pub uid: u64,
11950    #[doc = "Timestamp (time since system boot)."]
11951    pub time_boot_ms: u32,
11952    #[doc = "0xff)."]
11953    pub firmware_version: u32,
11954    #[doc = "0xff)."]
11955    pub hardware_version: u32,
11956    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
11957    pub roll_min: f32,
11958    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
11959    pub roll_max: f32,
11960    #[doc = "Minimum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
11961    pub pitch_min: f32,
11962    #[doc = "Maximum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
11963    pub pitch_max: f32,
11964    #[doc = "Minimum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
11965    pub yaw_min: f32,
11966    #[doc = "Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
11967    pub yaw_max: f32,
11968    #[doc = "Bitmap of gimbal capability flags."]
11969    pub cap_flags: GimbalDeviceCapFlags,
11970    #[doc = "Bitmap for use for gimbal-specific capability flags."]
11971    pub custom_cap_flags: u16,
11972    #[doc = "Name of the gimbal vendor."]
11973    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11974    pub vendor_name: [u8; 32],
11975    #[doc = "Name of the gimbal model."]
11976    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11977    pub model_name: [u8; 32],
11978    #[doc = "Custom name of the gimbal given to it by the user."]
11979    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11980    pub custom_name: [u8; 32],
11981    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
11982    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11983    pub gimbal_device_id: u8,
11984}
11985impl GIMBAL_DEVICE_INFORMATION_DATA {
11986    pub const ENCODED_LEN: usize = 145usize;
11987    pub const DEFAULT: Self = Self {
11988        uid: 0_u64,
11989        time_boot_ms: 0_u32,
11990        firmware_version: 0_u32,
11991        hardware_version: 0_u32,
11992        roll_min: 0.0_f32,
11993        roll_max: 0.0_f32,
11994        pitch_min: 0.0_f32,
11995        pitch_max: 0.0_f32,
11996        yaw_min: 0.0_f32,
11997        yaw_max: 0.0_f32,
11998        cap_flags: GimbalDeviceCapFlags::DEFAULT,
11999        custom_cap_flags: 0_u16,
12000        vendor_name: [0_u8; 32usize],
12001        model_name: [0_u8; 32usize],
12002        custom_name: [0_u8; 32usize],
12003        gimbal_device_id: 0_u8,
12004    };
12005    #[cfg(feature = "arbitrary")]
12006    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12007        use arbitrary::{Arbitrary, Unstructured};
12008        let mut buf = [0u8; 1024];
12009        rng.fill_bytes(&mut buf);
12010        let mut unstructured = Unstructured::new(&buf);
12011        Self::arbitrary(&mut unstructured).unwrap_or_default()
12012    }
12013}
12014impl Default for GIMBAL_DEVICE_INFORMATION_DATA {
12015    fn default() -> Self {
12016        Self::DEFAULT.clone()
12017    }
12018}
12019impl MessageData for GIMBAL_DEVICE_INFORMATION_DATA {
12020    type Message = MavMessage;
12021    const ID: u32 = 283u32;
12022    const NAME: &'static str = "GIMBAL_DEVICE_INFORMATION";
12023    const EXTRA_CRC: u8 = 74u8;
12024    const ENCODED_LEN: usize = 145usize;
12025    fn deser(
12026        _version: MavlinkVersion,
12027        __input: &[u8],
12028    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12029        let avail_len = __input.len();
12030        let mut payload_buf = [0; Self::ENCODED_LEN];
12031        let mut buf = if avail_len < Self::ENCODED_LEN {
12032            payload_buf[0..avail_len].copy_from_slice(__input);
12033            Bytes::new(&payload_buf)
12034        } else {
12035            Bytes::new(__input)
12036        };
12037        let mut __struct = Self::default();
12038        __struct.uid = buf.get_u64_le();
12039        __struct.time_boot_ms = buf.get_u32_le();
12040        __struct.firmware_version = buf.get_u32_le();
12041        __struct.hardware_version = buf.get_u32_le();
12042        __struct.roll_min = buf.get_f32_le();
12043        __struct.roll_max = buf.get_f32_le();
12044        __struct.pitch_min = buf.get_f32_le();
12045        __struct.pitch_max = buf.get_f32_le();
12046        __struct.yaw_min = buf.get_f32_le();
12047        __struct.yaw_max = buf.get_f32_le();
12048        let tmp = buf.get_u16_le();
12049        __struct.cap_flags = GimbalDeviceCapFlags::from_bits(
12050            tmp & GimbalDeviceCapFlags::all().bits(),
12051        )
12052        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12053            flag_type: "GimbalDeviceCapFlags",
12054            value: tmp as u32,
12055        })?;
12056        __struct.custom_cap_flags = buf.get_u16_le();
12057        for v in &mut __struct.vendor_name {
12058            let val = buf.get_u8();
12059            *v = val;
12060        }
12061        for v in &mut __struct.model_name {
12062            let val = buf.get_u8();
12063            *v = val;
12064        }
12065        for v in &mut __struct.custom_name {
12066            let val = buf.get_u8();
12067            *v = val;
12068        }
12069        __struct.gimbal_device_id = buf.get_u8();
12070        Ok(__struct)
12071    }
12072    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12073        let mut __tmp = BytesMut::new(bytes);
12074        #[allow(clippy::absurd_extreme_comparisons)]
12075        #[allow(unused_comparisons)]
12076        if __tmp.remaining() < Self::ENCODED_LEN {
12077            panic!(
12078                "buffer is too small (need {} bytes, but got {})",
12079                Self::ENCODED_LEN,
12080                __tmp.remaining(),
12081            )
12082        }
12083        __tmp.put_u64_le(self.uid);
12084        __tmp.put_u32_le(self.time_boot_ms);
12085        __tmp.put_u32_le(self.firmware_version);
12086        __tmp.put_u32_le(self.hardware_version);
12087        __tmp.put_f32_le(self.roll_min);
12088        __tmp.put_f32_le(self.roll_max);
12089        __tmp.put_f32_le(self.pitch_min);
12090        __tmp.put_f32_le(self.pitch_max);
12091        __tmp.put_f32_le(self.yaw_min);
12092        __tmp.put_f32_le(self.yaw_max);
12093        __tmp.put_u16_le(self.cap_flags.bits());
12094        __tmp.put_u16_le(self.custom_cap_flags);
12095        for val in &self.vendor_name {
12096            __tmp.put_u8(*val);
12097        }
12098        for val in &self.model_name {
12099            __tmp.put_u8(*val);
12100        }
12101        for val in &self.custom_name {
12102            __tmp.put_u8(*val);
12103        }
12104        __tmp.put_u8(self.gimbal_device_id);
12105        if matches!(version, MavlinkVersion::V2) {
12106            let len = __tmp.len();
12107            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12108        } else {
12109            __tmp.len()
12110        }
12111    }
12112}
12113#[doc = "id: 284"]
12114#[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
12115#[derive(Debug, Clone, PartialEq)]
12116#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12117#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12118pub struct GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12119    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description. Set fields to NaN to be ignored."]
12120    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12121    pub q: [f32; 4],
12122    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN to be ignored."]
12123    pub angular_velocity_x: f32,
12124    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN to be ignored."]
12125    pub angular_velocity_y: f32,
12126    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN to be ignored."]
12127    pub angular_velocity_z: f32,
12128    #[doc = "Low level gimbal flags."]
12129    pub flags: GimbalDeviceFlags,
12130    #[doc = "System ID"]
12131    pub target_system: u8,
12132    #[doc = "Component ID"]
12133    pub target_component: u8,
12134}
12135impl GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12136    pub const ENCODED_LEN: usize = 32usize;
12137    pub const DEFAULT: Self = Self {
12138        q: [0.0_f32; 4usize],
12139        angular_velocity_x: 0.0_f32,
12140        angular_velocity_y: 0.0_f32,
12141        angular_velocity_z: 0.0_f32,
12142        flags: GimbalDeviceFlags::DEFAULT,
12143        target_system: 0_u8,
12144        target_component: 0_u8,
12145    };
12146    #[cfg(feature = "arbitrary")]
12147    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12148        use arbitrary::{Arbitrary, Unstructured};
12149        let mut buf = [0u8; 1024];
12150        rng.fill_bytes(&mut buf);
12151        let mut unstructured = Unstructured::new(&buf);
12152        Self::arbitrary(&mut unstructured).unwrap_or_default()
12153    }
12154}
12155impl Default for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12156    fn default() -> Self {
12157        Self::DEFAULT.clone()
12158    }
12159}
12160impl MessageData for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12161    type Message = MavMessage;
12162    const ID: u32 = 284u32;
12163    const NAME: &'static str = "GIMBAL_DEVICE_SET_ATTITUDE";
12164    const EXTRA_CRC: u8 = 99u8;
12165    const ENCODED_LEN: usize = 32usize;
12166    fn deser(
12167        _version: MavlinkVersion,
12168        __input: &[u8],
12169    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12170        let avail_len = __input.len();
12171        let mut payload_buf = [0; Self::ENCODED_LEN];
12172        let mut buf = if avail_len < Self::ENCODED_LEN {
12173            payload_buf[0..avail_len].copy_from_slice(__input);
12174            Bytes::new(&payload_buf)
12175        } else {
12176            Bytes::new(__input)
12177        };
12178        let mut __struct = Self::default();
12179        for v in &mut __struct.q {
12180            let val = buf.get_f32_le();
12181            *v = val;
12182        }
12183        __struct.angular_velocity_x = buf.get_f32_le();
12184        __struct.angular_velocity_y = buf.get_f32_le();
12185        __struct.angular_velocity_z = buf.get_f32_le();
12186        let tmp = buf.get_u16_le();
12187        __struct.flags = GimbalDeviceFlags::from_bits(tmp & GimbalDeviceFlags::all().bits())
12188            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12189                flag_type: "GimbalDeviceFlags",
12190                value: tmp as u32,
12191            })?;
12192        __struct.target_system = buf.get_u8();
12193        __struct.target_component = buf.get_u8();
12194        Ok(__struct)
12195    }
12196    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12197        let mut __tmp = BytesMut::new(bytes);
12198        #[allow(clippy::absurd_extreme_comparisons)]
12199        #[allow(unused_comparisons)]
12200        if __tmp.remaining() < Self::ENCODED_LEN {
12201            panic!(
12202                "buffer is too small (need {} bytes, but got {})",
12203                Self::ENCODED_LEN,
12204                __tmp.remaining(),
12205            )
12206        }
12207        for val in &self.q {
12208            __tmp.put_f32_le(*val);
12209        }
12210        __tmp.put_f32_le(self.angular_velocity_x);
12211        __tmp.put_f32_le(self.angular_velocity_y);
12212        __tmp.put_f32_le(self.angular_velocity_z);
12213        __tmp.put_u16_le(self.flags.bits());
12214        __tmp.put_u8(self.target_system);
12215        __tmp.put_u8(self.target_component);
12216        if matches!(version, MavlinkVersion::V2) {
12217            let len = __tmp.len();
12218            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12219        } else {
12220            __tmp.len()
12221        }
12222    }
12223}
12224#[doc = "id: 280"]
12225#[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
12226#[derive(Debug, Clone, PartialEq)]
12227#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12228#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12229pub struct GIMBAL_MANAGER_INFORMATION_DATA {
12230    #[doc = "Timestamp (time since system boot)."]
12231    pub time_boot_ms: u32,
12232    #[doc = "Bitmap of gimbal capability flags."]
12233    pub cap_flags: GimbalManagerCapFlags,
12234    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
12235    pub roll_min: f32,
12236    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
12237    pub roll_max: f32,
12238    #[doc = "Minimum pitch angle (positive: up, negative: down)"]
12239    pub pitch_min: f32,
12240    #[doc = "Maximum pitch angle (positive: up, negative: down)"]
12241    pub pitch_max: f32,
12242    #[doc = "Minimum yaw angle (positive: to the right, negative: to the left)"]
12243    pub yaw_min: f32,
12244    #[doc = "Maximum yaw angle (positive: to the right, negative: to the left)"]
12245    pub yaw_max: f32,
12246    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
12247    pub gimbal_device_id: u8,
12248}
12249impl GIMBAL_MANAGER_INFORMATION_DATA {
12250    pub const ENCODED_LEN: usize = 33usize;
12251    pub const DEFAULT: Self = Self {
12252        time_boot_ms: 0_u32,
12253        cap_flags: GimbalManagerCapFlags::DEFAULT,
12254        roll_min: 0.0_f32,
12255        roll_max: 0.0_f32,
12256        pitch_min: 0.0_f32,
12257        pitch_max: 0.0_f32,
12258        yaw_min: 0.0_f32,
12259        yaw_max: 0.0_f32,
12260        gimbal_device_id: 0_u8,
12261    };
12262    #[cfg(feature = "arbitrary")]
12263    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12264        use arbitrary::{Arbitrary, Unstructured};
12265        let mut buf = [0u8; 1024];
12266        rng.fill_bytes(&mut buf);
12267        let mut unstructured = Unstructured::new(&buf);
12268        Self::arbitrary(&mut unstructured).unwrap_or_default()
12269    }
12270}
12271impl Default for GIMBAL_MANAGER_INFORMATION_DATA {
12272    fn default() -> Self {
12273        Self::DEFAULT.clone()
12274    }
12275}
12276impl MessageData for GIMBAL_MANAGER_INFORMATION_DATA {
12277    type Message = MavMessage;
12278    const ID: u32 = 280u32;
12279    const NAME: &'static str = "GIMBAL_MANAGER_INFORMATION";
12280    const EXTRA_CRC: u8 = 70u8;
12281    const ENCODED_LEN: usize = 33usize;
12282    fn deser(
12283        _version: MavlinkVersion,
12284        __input: &[u8],
12285    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12286        let avail_len = __input.len();
12287        let mut payload_buf = [0; Self::ENCODED_LEN];
12288        let mut buf = if avail_len < Self::ENCODED_LEN {
12289            payload_buf[0..avail_len].copy_from_slice(__input);
12290            Bytes::new(&payload_buf)
12291        } else {
12292            Bytes::new(__input)
12293        };
12294        let mut __struct = Self::default();
12295        __struct.time_boot_ms = buf.get_u32_le();
12296        let tmp = buf.get_u32_le();
12297        __struct.cap_flags = GimbalManagerCapFlags::from_bits(
12298            tmp & GimbalManagerCapFlags::all().bits(),
12299        )
12300        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12301            flag_type: "GimbalManagerCapFlags",
12302            value: tmp as u32,
12303        })?;
12304        __struct.roll_min = buf.get_f32_le();
12305        __struct.roll_max = buf.get_f32_le();
12306        __struct.pitch_min = buf.get_f32_le();
12307        __struct.pitch_max = buf.get_f32_le();
12308        __struct.yaw_min = buf.get_f32_le();
12309        __struct.yaw_max = buf.get_f32_le();
12310        __struct.gimbal_device_id = buf.get_u8();
12311        Ok(__struct)
12312    }
12313    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12314        let mut __tmp = BytesMut::new(bytes);
12315        #[allow(clippy::absurd_extreme_comparisons)]
12316        #[allow(unused_comparisons)]
12317        if __tmp.remaining() < Self::ENCODED_LEN {
12318            panic!(
12319                "buffer is too small (need {} bytes, but got {})",
12320                Self::ENCODED_LEN,
12321                __tmp.remaining(),
12322            )
12323        }
12324        __tmp.put_u32_le(self.time_boot_ms);
12325        __tmp.put_u32_le(self.cap_flags.bits());
12326        __tmp.put_f32_le(self.roll_min);
12327        __tmp.put_f32_le(self.roll_max);
12328        __tmp.put_f32_le(self.pitch_min);
12329        __tmp.put_f32_le(self.pitch_max);
12330        __tmp.put_f32_le(self.yaw_min);
12331        __tmp.put_f32_le(self.yaw_max);
12332        __tmp.put_u8(self.gimbal_device_id);
12333        if matches!(version, MavlinkVersion::V2) {
12334            let len = __tmp.len();
12335            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12336        } else {
12337            __tmp.len()
12338        }
12339    }
12340}
12341#[doc = "id: 282"]
12342#[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
12343#[derive(Debug, Clone, PartialEq)]
12344#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12345#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12346pub struct GIMBAL_MANAGER_SET_ATTITUDE_DATA {
12347    #[doc = "High level gimbal manager flags to use."]
12348    pub flags: GimbalManagerFlags,
12349    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is depends on whether the flag GIMBAL_MANAGER_FLAGS_YAW_LOCK is set)"]
12350    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12351    pub q: [f32; 4],
12352    #[doc = "X component of angular velocity, positive is rolling to the right, NaN to be ignored."]
12353    pub angular_velocity_x: f32,
12354    #[doc = "Y component of angular velocity, positive is pitching up, NaN to be ignored."]
12355    pub angular_velocity_y: f32,
12356    #[doc = "Z component of angular velocity, positive is yawing to the right, NaN to be ignored."]
12357    pub angular_velocity_z: f32,
12358    #[doc = "System ID"]
12359    pub target_system: u8,
12360    #[doc = "Component ID"]
12361    pub target_component: u8,
12362    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
12363    pub gimbal_device_id: u8,
12364}
12365impl GIMBAL_MANAGER_SET_ATTITUDE_DATA {
12366    pub const ENCODED_LEN: usize = 35usize;
12367    pub const DEFAULT: Self = Self {
12368        flags: GimbalManagerFlags::DEFAULT,
12369        q: [0.0_f32; 4usize],
12370        angular_velocity_x: 0.0_f32,
12371        angular_velocity_y: 0.0_f32,
12372        angular_velocity_z: 0.0_f32,
12373        target_system: 0_u8,
12374        target_component: 0_u8,
12375        gimbal_device_id: 0_u8,
12376    };
12377    #[cfg(feature = "arbitrary")]
12378    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12379        use arbitrary::{Arbitrary, Unstructured};
12380        let mut buf = [0u8; 1024];
12381        rng.fill_bytes(&mut buf);
12382        let mut unstructured = Unstructured::new(&buf);
12383        Self::arbitrary(&mut unstructured).unwrap_or_default()
12384    }
12385}
12386impl Default for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
12387    fn default() -> Self {
12388        Self::DEFAULT.clone()
12389    }
12390}
12391impl MessageData for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
12392    type Message = MavMessage;
12393    const ID: u32 = 282u32;
12394    const NAME: &'static str = "GIMBAL_MANAGER_SET_ATTITUDE";
12395    const EXTRA_CRC: u8 = 123u8;
12396    const ENCODED_LEN: usize = 35usize;
12397    fn deser(
12398        _version: MavlinkVersion,
12399        __input: &[u8],
12400    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12401        let avail_len = __input.len();
12402        let mut payload_buf = [0; Self::ENCODED_LEN];
12403        let mut buf = if avail_len < Self::ENCODED_LEN {
12404            payload_buf[0..avail_len].copy_from_slice(__input);
12405            Bytes::new(&payload_buf)
12406        } else {
12407            Bytes::new(__input)
12408        };
12409        let mut __struct = Self::default();
12410        let tmp = buf.get_u32_le();
12411        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
12412            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12413                flag_type: "GimbalManagerFlags",
12414                value: tmp as u32,
12415            })?;
12416        for v in &mut __struct.q {
12417            let val = buf.get_f32_le();
12418            *v = val;
12419        }
12420        __struct.angular_velocity_x = buf.get_f32_le();
12421        __struct.angular_velocity_y = buf.get_f32_le();
12422        __struct.angular_velocity_z = buf.get_f32_le();
12423        __struct.target_system = buf.get_u8();
12424        __struct.target_component = buf.get_u8();
12425        __struct.gimbal_device_id = buf.get_u8();
12426        Ok(__struct)
12427    }
12428    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12429        let mut __tmp = BytesMut::new(bytes);
12430        #[allow(clippy::absurd_extreme_comparisons)]
12431        #[allow(unused_comparisons)]
12432        if __tmp.remaining() < Self::ENCODED_LEN {
12433            panic!(
12434                "buffer is too small (need {} bytes, but got {})",
12435                Self::ENCODED_LEN,
12436                __tmp.remaining(),
12437            )
12438        }
12439        __tmp.put_u32_le(self.flags.bits());
12440        for val in &self.q {
12441            __tmp.put_f32_le(*val);
12442        }
12443        __tmp.put_f32_le(self.angular_velocity_x);
12444        __tmp.put_f32_le(self.angular_velocity_y);
12445        __tmp.put_f32_le(self.angular_velocity_z);
12446        __tmp.put_u8(self.target_system);
12447        __tmp.put_u8(self.target_component);
12448        __tmp.put_u8(self.gimbal_device_id);
12449        if matches!(version, MavlinkVersion::V2) {
12450            let len = __tmp.len();
12451            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12452        } else {
12453            __tmp.len()
12454        }
12455    }
12456}
12457#[doc = "id: 288"]
12458#[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
12459#[derive(Debug, Clone, PartialEq)]
12460#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12461#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12462pub struct GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
12463    #[doc = "High level gimbal manager flags."]
12464    pub flags: GimbalManagerFlags,
12465    #[doc = "Pitch angle unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
12466    pub pitch: f32,
12467    #[doc = "Yaw angle unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
12468    pub yaw: f32,
12469    #[doc = "Pitch angular rate unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
12470    pub pitch_rate: f32,
12471    #[doc = "Yaw angular rate unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
12472    pub yaw_rate: f32,
12473    #[doc = "System ID"]
12474    pub target_system: u8,
12475    #[doc = "Component ID"]
12476    pub target_component: u8,
12477    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
12478    pub gimbal_device_id: u8,
12479}
12480impl GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
12481    pub const ENCODED_LEN: usize = 23usize;
12482    pub const DEFAULT: Self = Self {
12483        flags: GimbalManagerFlags::DEFAULT,
12484        pitch: 0.0_f32,
12485        yaw: 0.0_f32,
12486        pitch_rate: 0.0_f32,
12487        yaw_rate: 0.0_f32,
12488        target_system: 0_u8,
12489        target_component: 0_u8,
12490        gimbal_device_id: 0_u8,
12491    };
12492    #[cfg(feature = "arbitrary")]
12493    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12494        use arbitrary::{Arbitrary, Unstructured};
12495        let mut buf = [0u8; 1024];
12496        rng.fill_bytes(&mut buf);
12497        let mut unstructured = Unstructured::new(&buf);
12498        Self::arbitrary(&mut unstructured).unwrap_or_default()
12499    }
12500}
12501impl Default for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
12502    fn default() -> Self {
12503        Self::DEFAULT.clone()
12504    }
12505}
12506impl MessageData for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
12507    type Message = MavMessage;
12508    const ID: u32 = 288u32;
12509    const NAME: &'static str = "GIMBAL_MANAGER_SET_MANUAL_CONTROL";
12510    const EXTRA_CRC: u8 = 20u8;
12511    const ENCODED_LEN: usize = 23usize;
12512    fn deser(
12513        _version: MavlinkVersion,
12514        __input: &[u8],
12515    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12516        let avail_len = __input.len();
12517        let mut payload_buf = [0; Self::ENCODED_LEN];
12518        let mut buf = if avail_len < Self::ENCODED_LEN {
12519            payload_buf[0..avail_len].copy_from_slice(__input);
12520            Bytes::new(&payload_buf)
12521        } else {
12522            Bytes::new(__input)
12523        };
12524        let mut __struct = Self::default();
12525        let tmp = buf.get_u32_le();
12526        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
12527            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12528                flag_type: "GimbalManagerFlags",
12529                value: tmp as u32,
12530            })?;
12531        __struct.pitch = buf.get_f32_le();
12532        __struct.yaw = buf.get_f32_le();
12533        __struct.pitch_rate = buf.get_f32_le();
12534        __struct.yaw_rate = buf.get_f32_le();
12535        __struct.target_system = buf.get_u8();
12536        __struct.target_component = buf.get_u8();
12537        __struct.gimbal_device_id = buf.get_u8();
12538        Ok(__struct)
12539    }
12540    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12541        let mut __tmp = BytesMut::new(bytes);
12542        #[allow(clippy::absurd_extreme_comparisons)]
12543        #[allow(unused_comparisons)]
12544        if __tmp.remaining() < Self::ENCODED_LEN {
12545            panic!(
12546                "buffer is too small (need {} bytes, but got {})",
12547                Self::ENCODED_LEN,
12548                __tmp.remaining(),
12549            )
12550        }
12551        __tmp.put_u32_le(self.flags.bits());
12552        __tmp.put_f32_le(self.pitch);
12553        __tmp.put_f32_le(self.yaw);
12554        __tmp.put_f32_le(self.pitch_rate);
12555        __tmp.put_f32_le(self.yaw_rate);
12556        __tmp.put_u8(self.target_system);
12557        __tmp.put_u8(self.target_component);
12558        __tmp.put_u8(self.gimbal_device_id);
12559        if matches!(version, MavlinkVersion::V2) {
12560            let len = __tmp.len();
12561            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12562        } else {
12563            __tmp.len()
12564        }
12565    }
12566}
12567#[doc = "id: 287"]
12568#[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
12569#[derive(Debug, Clone, PartialEq)]
12570#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12571#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12572pub struct GIMBAL_MANAGER_SET_PITCHYAW_DATA {
12573    #[doc = "High level gimbal manager flags to use."]
12574    pub flags: GimbalManagerFlags,
12575    #[doc = "Pitch angle (positive: up, negative: down, NaN to be ignored)."]
12576    pub pitch: f32,
12577    #[doc = "Yaw angle (positive: to the right, negative: to the left, NaN to be ignored)."]
12578    pub yaw: f32,
12579    #[doc = "Pitch angular rate (positive: up, negative: down, NaN to be ignored)."]
12580    pub pitch_rate: f32,
12581    #[doc = "Yaw angular rate (positive: to the right, negative: to the left, NaN to be ignored)."]
12582    pub yaw_rate: f32,
12583    #[doc = "System ID"]
12584    pub target_system: u8,
12585    #[doc = "Component ID"]
12586    pub target_component: u8,
12587    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
12588    pub gimbal_device_id: u8,
12589}
12590impl GIMBAL_MANAGER_SET_PITCHYAW_DATA {
12591    pub const ENCODED_LEN: usize = 23usize;
12592    pub const DEFAULT: Self = Self {
12593        flags: GimbalManagerFlags::DEFAULT,
12594        pitch: 0.0_f32,
12595        yaw: 0.0_f32,
12596        pitch_rate: 0.0_f32,
12597        yaw_rate: 0.0_f32,
12598        target_system: 0_u8,
12599        target_component: 0_u8,
12600        gimbal_device_id: 0_u8,
12601    };
12602    #[cfg(feature = "arbitrary")]
12603    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12604        use arbitrary::{Arbitrary, Unstructured};
12605        let mut buf = [0u8; 1024];
12606        rng.fill_bytes(&mut buf);
12607        let mut unstructured = Unstructured::new(&buf);
12608        Self::arbitrary(&mut unstructured).unwrap_or_default()
12609    }
12610}
12611impl Default for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
12612    fn default() -> Self {
12613        Self::DEFAULT.clone()
12614    }
12615}
12616impl MessageData for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
12617    type Message = MavMessage;
12618    const ID: u32 = 287u32;
12619    const NAME: &'static str = "GIMBAL_MANAGER_SET_PITCHYAW";
12620    const EXTRA_CRC: u8 = 1u8;
12621    const ENCODED_LEN: usize = 23usize;
12622    fn deser(
12623        _version: MavlinkVersion,
12624        __input: &[u8],
12625    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12626        let avail_len = __input.len();
12627        let mut payload_buf = [0; Self::ENCODED_LEN];
12628        let mut buf = if avail_len < Self::ENCODED_LEN {
12629            payload_buf[0..avail_len].copy_from_slice(__input);
12630            Bytes::new(&payload_buf)
12631        } else {
12632            Bytes::new(__input)
12633        };
12634        let mut __struct = Self::default();
12635        let tmp = buf.get_u32_le();
12636        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
12637            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12638                flag_type: "GimbalManagerFlags",
12639                value: tmp as u32,
12640            })?;
12641        __struct.pitch = buf.get_f32_le();
12642        __struct.yaw = buf.get_f32_le();
12643        __struct.pitch_rate = buf.get_f32_le();
12644        __struct.yaw_rate = buf.get_f32_le();
12645        __struct.target_system = buf.get_u8();
12646        __struct.target_component = buf.get_u8();
12647        __struct.gimbal_device_id = buf.get_u8();
12648        Ok(__struct)
12649    }
12650    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12651        let mut __tmp = BytesMut::new(bytes);
12652        #[allow(clippy::absurd_extreme_comparisons)]
12653        #[allow(unused_comparisons)]
12654        if __tmp.remaining() < Self::ENCODED_LEN {
12655            panic!(
12656                "buffer is too small (need {} bytes, but got {})",
12657                Self::ENCODED_LEN,
12658                __tmp.remaining(),
12659            )
12660        }
12661        __tmp.put_u32_le(self.flags.bits());
12662        __tmp.put_f32_le(self.pitch);
12663        __tmp.put_f32_le(self.yaw);
12664        __tmp.put_f32_le(self.pitch_rate);
12665        __tmp.put_f32_le(self.yaw_rate);
12666        __tmp.put_u8(self.target_system);
12667        __tmp.put_u8(self.target_component);
12668        __tmp.put_u8(self.gimbal_device_id);
12669        if matches!(version, MavlinkVersion::V2) {
12670            let len = __tmp.len();
12671            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12672        } else {
12673            __tmp.len()
12674        }
12675    }
12676}
12677#[doc = "id: 281"]
12678#[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
12679#[derive(Debug, Clone, PartialEq)]
12680#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12681#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12682pub struct GIMBAL_MANAGER_STATUS_DATA {
12683    #[doc = "Timestamp (time since system boot)."]
12684    pub time_boot_ms: u32,
12685    #[doc = "High level gimbal manager flags currently applied."]
12686    pub flags: GimbalManagerFlags,
12687    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
12688    pub gimbal_device_id: u8,
12689    #[doc = "System ID of MAVLink component with primary control, 0 for none."]
12690    pub primary_control_sysid: u8,
12691    #[doc = "Component ID of MAVLink component with primary control, 0 for none."]
12692    pub primary_control_compid: u8,
12693    #[doc = "System ID of MAVLink component with secondary control, 0 for none."]
12694    pub secondary_control_sysid: u8,
12695    #[doc = "Component ID of MAVLink component with secondary control, 0 for none."]
12696    pub secondary_control_compid: u8,
12697}
12698impl GIMBAL_MANAGER_STATUS_DATA {
12699    pub const ENCODED_LEN: usize = 13usize;
12700    pub const DEFAULT: Self = Self {
12701        time_boot_ms: 0_u32,
12702        flags: GimbalManagerFlags::DEFAULT,
12703        gimbal_device_id: 0_u8,
12704        primary_control_sysid: 0_u8,
12705        primary_control_compid: 0_u8,
12706        secondary_control_sysid: 0_u8,
12707        secondary_control_compid: 0_u8,
12708    };
12709    #[cfg(feature = "arbitrary")]
12710    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12711        use arbitrary::{Arbitrary, Unstructured};
12712        let mut buf = [0u8; 1024];
12713        rng.fill_bytes(&mut buf);
12714        let mut unstructured = Unstructured::new(&buf);
12715        Self::arbitrary(&mut unstructured).unwrap_or_default()
12716    }
12717}
12718impl Default for GIMBAL_MANAGER_STATUS_DATA {
12719    fn default() -> Self {
12720        Self::DEFAULT.clone()
12721    }
12722}
12723impl MessageData for GIMBAL_MANAGER_STATUS_DATA {
12724    type Message = MavMessage;
12725    const ID: u32 = 281u32;
12726    const NAME: &'static str = "GIMBAL_MANAGER_STATUS";
12727    const EXTRA_CRC: u8 = 48u8;
12728    const ENCODED_LEN: usize = 13usize;
12729    fn deser(
12730        _version: MavlinkVersion,
12731        __input: &[u8],
12732    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12733        let avail_len = __input.len();
12734        let mut payload_buf = [0; Self::ENCODED_LEN];
12735        let mut buf = if avail_len < Self::ENCODED_LEN {
12736            payload_buf[0..avail_len].copy_from_slice(__input);
12737            Bytes::new(&payload_buf)
12738        } else {
12739            Bytes::new(__input)
12740        };
12741        let mut __struct = Self::default();
12742        __struct.time_boot_ms = buf.get_u32_le();
12743        let tmp = buf.get_u32_le();
12744        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
12745            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12746                flag_type: "GimbalManagerFlags",
12747                value: tmp as u32,
12748            })?;
12749        __struct.gimbal_device_id = buf.get_u8();
12750        __struct.primary_control_sysid = buf.get_u8();
12751        __struct.primary_control_compid = buf.get_u8();
12752        __struct.secondary_control_sysid = buf.get_u8();
12753        __struct.secondary_control_compid = buf.get_u8();
12754        Ok(__struct)
12755    }
12756    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12757        let mut __tmp = BytesMut::new(bytes);
12758        #[allow(clippy::absurd_extreme_comparisons)]
12759        #[allow(unused_comparisons)]
12760        if __tmp.remaining() < Self::ENCODED_LEN {
12761            panic!(
12762                "buffer is too small (need {} bytes, but got {})",
12763                Self::ENCODED_LEN,
12764                __tmp.remaining(),
12765            )
12766        }
12767        __tmp.put_u32_le(self.time_boot_ms);
12768        __tmp.put_u32_le(self.flags.bits());
12769        __tmp.put_u8(self.gimbal_device_id);
12770        __tmp.put_u8(self.primary_control_sysid);
12771        __tmp.put_u8(self.primary_control_compid);
12772        __tmp.put_u8(self.secondary_control_sysid);
12773        __tmp.put_u8(self.secondary_control_compid);
12774        if matches!(version, MavlinkVersion::V2) {
12775            let len = __tmp.len();
12776            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12777        } else {
12778            __tmp.len()
12779        }
12780    }
12781}
12782#[doc = "id: 33"]
12783#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
12784#[derive(Debug, Clone, PartialEq)]
12785#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12786#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12787pub struct GLOBAL_POSITION_INT_DATA {
12788    #[doc = "Timestamp (time since system boot)."]
12789    pub time_boot_ms: u32,
12790    #[doc = "Latitude, expressed"]
12791    pub lat: i32,
12792    #[doc = "Longitude, expressed"]
12793    pub lon: i32,
12794    #[doc = "Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL."]
12795    pub alt: i32,
12796    #[doc = "Altitude above home"]
12797    pub relative_alt: i32,
12798    #[doc = "Ground X Speed (Latitude, positive north)"]
12799    pub vx: i16,
12800    #[doc = "Ground Y Speed (Longitude, positive east)"]
12801    pub vy: i16,
12802    #[doc = "Ground Z Speed (Altitude, positive down)"]
12803    pub vz: i16,
12804    #[doc = "Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
12805    pub hdg: u16,
12806}
12807impl GLOBAL_POSITION_INT_DATA {
12808    pub const ENCODED_LEN: usize = 28usize;
12809    pub const DEFAULT: Self = Self {
12810        time_boot_ms: 0_u32,
12811        lat: 0_i32,
12812        lon: 0_i32,
12813        alt: 0_i32,
12814        relative_alt: 0_i32,
12815        vx: 0_i16,
12816        vy: 0_i16,
12817        vz: 0_i16,
12818        hdg: 0_u16,
12819    };
12820    #[cfg(feature = "arbitrary")]
12821    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12822        use arbitrary::{Arbitrary, Unstructured};
12823        let mut buf = [0u8; 1024];
12824        rng.fill_bytes(&mut buf);
12825        let mut unstructured = Unstructured::new(&buf);
12826        Self::arbitrary(&mut unstructured).unwrap_or_default()
12827    }
12828}
12829impl Default for GLOBAL_POSITION_INT_DATA {
12830    fn default() -> Self {
12831        Self::DEFAULT.clone()
12832    }
12833}
12834impl MessageData for GLOBAL_POSITION_INT_DATA {
12835    type Message = MavMessage;
12836    const ID: u32 = 33u32;
12837    const NAME: &'static str = "GLOBAL_POSITION_INT";
12838    const EXTRA_CRC: u8 = 104u8;
12839    const ENCODED_LEN: usize = 28usize;
12840    fn deser(
12841        _version: MavlinkVersion,
12842        __input: &[u8],
12843    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12844        let avail_len = __input.len();
12845        let mut payload_buf = [0; Self::ENCODED_LEN];
12846        let mut buf = if avail_len < Self::ENCODED_LEN {
12847            payload_buf[0..avail_len].copy_from_slice(__input);
12848            Bytes::new(&payload_buf)
12849        } else {
12850            Bytes::new(__input)
12851        };
12852        let mut __struct = Self::default();
12853        __struct.time_boot_ms = buf.get_u32_le();
12854        __struct.lat = buf.get_i32_le();
12855        __struct.lon = buf.get_i32_le();
12856        __struct.alt = buf.get_i32_le();
12857        __struct.relative_alt = buf.get_i32_le();
12858        __struct.vx = buf.get_i16_le();
12859        __struct.vy = buf.get_i16_le();
12860        __struct.vz = buf.get_i16_le();
12861        __struct.hdg = buf.get_u16_le();
12862        Ok(__struct)
12863    }
12864    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12865        let mut __tmp = BytesMut::new(bytes);
12866        #[allow(clippy::absurd_extreme_comparisons)]
12867        #[allow(unused_comparisons)]
12868        if __tmp.remaining() < Self::ENCODED_LEN {
12869            panic!(
12870                "buffer is too small (need {} bytes, but got {})",
12871                Self::ENCODED_LEN,
12872                __tmp.remaining(),
12873            )
12874        }
12875        __tmp.put_u32_le(self.time_boot_ms);
12876        __tmp.put_i32_le(self.lat);
12877        __tmp.put_i32_le(self.lon);
12878        __tmp.put_i32_le(self.alt);
12879        __tmp.put_i32_le(self.relative_alt);
12880        __tmp.put_i16_le(self.vx);
12881        __tmp.put_i16_le(self.vy);
12882        __tmp.put_i16_le(self.vz);
12883        __tmp.put_u16_le(self.hdg);
12884        if matches!(version, MavlinkVersion::V2) {
12885            let len = __tmp.len();
12886            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12887        } else {
12888            __tmp.len()
12889        }
12890    }
12891}
12892#[doc = "id: 63"]
12893#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
12894#[derive(Debug, Clone, PartialEq)]
12895#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12896#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12897pub struct GLOBAL_POSITION_INT_COV_DATA {
12898    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
12899    pub time_usec: u64,
12900    #[doc = "Latitude"]
12901    pub lat: i32,
12902    #[doc = "Longitude"]
12903    pub lon: i32,
12904    #[doc = "Altitude in meters above MSL"]
12905    pub alt: i32,
12906    #[doc = "Altitude above ground"]
12907    pub relative_alt: i32,
12908    #[doc = "Ground X Speed (Latitude)"]
12909    pub vx: f32,
12910    #[doc = "Ground Y Speed (Longitude)"]
12911    pub vy: f32,
12912    #[doc = "Ground Z Speed (Altitude)"]
12913    pub vz: f32,
12914    #[doc = "Row-major representation of a 6x6 position and velocity 6x6 cross-covariance matrix (states: lat, lon, alt, vx, vy, vz; first six entries are the first ROW, next six entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
12915    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12916    pub covariance: [f32; 36],
12917    #[doc = "Class id of the estimator this estimate originated from."]
12918    pub estimator_type: MavEstimatorType,
12919}
12920impl GLOBAL_POSITION_INT_COV_DATA {
12921    pub const ENCODED_LEN: usize = 181usize;
12922    pub const DEFAULT: Self = Self {
12923        time_usec: 0_u64,
12924        lat: 0_i32,
12925        lon: 0_i32,
12926        alt: 0_i32,
12927        relative_alt: 0_i32,
12928        vx: 0.0_f32,
12929        vy: 0.0_f32,
12930        vz: 0.0_f32,
12931        covariance: [0.0_f32; 36usize],
12932        estimator_type: MavEstimatorType::DEFAULT,
12933    };
12934    #[cfg(feature = "arbitrary")]
12935    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12936        use arbitrary::{Arbitrary, Unstructured};
12937        let mut buf = [0u8; 1024];
12938        rng.fill_bytes(&mut buf);
12939        let mut unstructured = Unstructured::new(&buf);
12940        Self::arbitrary(&mut unstructured).unwrap_or_default()
12941    }
12942}
12943impl Default for GLOBAL_POSITION_INT_COV_DATA {
12944    fn default() -> Self {
12945        Self::DEFAULT.clone()
12946    }
12947}
12948impl MessageData for GLOBAL_POSITION_INT_COV_DATA {
12949    type Message = MavMessage;
12950    const ID: u32 = 63u32;
12951    const NAME: &'static str = "GLOBAL_POSITION_INT_COV";
12952    const EXTRA_CRC: u8 = 119u8;
12953    const ENCODED_LEN: usize = 181usize;
12954    fn deser(
12955        _version: MavlinkVersion,
12956        __input: &[u8],
12957    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12958        let avail_len = __input.len();
12959        let mut payload_buf = [0; Self::ENCODED_LEN];
12960        let mut buf = if avail_len < Self::ENCODED_LEN {
12961            payload_buf[0..avail_len].copy_from_slice(__input);
12962            Bytes::new(&payload_buf)
12963        } else {
12964            Bytes::new(__input)
12965        };
12966        let mut __struct = Self::default();
12967        __struct.time_usec = buf.get_u64_le();
12968        __struct.lat = buf.get_i32_le();
12969        __struct.lon = buf.get_i32_le();
12970        __struct.alt = buf.get_i32_le();
12971        __struct.relative_alt = buf.get_i32_le();
12972        __struct.vx = buf.get_f32_le();
12973        __struct.vy = buf.get_f32_le();
12974        __struct.vz = buf.get_f32_le();
12975        for v in &mut __struct.covariance {
12976            let val = buf.get_f32_le();
12977            *v = val;
12978        }
12979        let tmp = buf.get_u8();
12980        __struct.estimator_type =
12981            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12982                enum_type: "MavEstimatorType",
12983                value: tmp as u32,
12984            })?;
12985        Ok(__struct)
12986    }
12987    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12988        let mut __tmp = BytesMut::new(bytes);
12989        #[allow(clippy::absurd_extreme_comparisons)]
12990        #[allow(unused_comparisons)]
12991        if __tmp.remaining() < Self::ENCODED_LEN {
12992            panic!(
12993                "buffer is too small (need {} bytes, but got {})",
12994                Self::ENCODED_LEN,
12995                __tmp.remaining(),
12996            )
12997        }
12998        __tmp.put_u64_le(self.time_usec);
12999        __tmp.put_i32_le(self.lat);
13000        __tmp.put_i32_le(self.lon);
13001        __tmp.put_i32_le(self.alt);
13002        __tmp.put_i32_le(self.relative_alt);
13003        __tmp.put_f32_le(self.vx);
13004        __tmp.put_f32_le(self.vy);
13005        __tmp.put_f32_le(self.vz);
13006        for val in &self.covariance {
13007            __tmp.put_f32_le(*val);
13008        }
13009        __tmp.put_u8(self.estimator_type as u8);
13010        if matches!(version, MavlinkVersion::V2) {
13011            let len = __tmp.len();
13012            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13013        } else {
13014            __tmp.len()
13015        }
13016    }
13017}
13018#[doc = "id: 101"]
13019#[doc = "Global position/attitude estimate from a vision source."]
13020#[derive(Debug, Clone, PartialEq)]
13021#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13022#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13023pub struct GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13024    #[doc = "Timestamp (UNIX time or since system boot)"]
13025    pub usec: u64,
13026    #[doc = "Global X position"]
13027    pub x: f32,
13028    #[doc = "Global Y position"]
13029    pub y: f32,
13030    #[doc = "Global Z position"]
13031    pub z: f32,
13032    #[doc = "Roll angle"]
13033    pub roll: f32,
13034    #[doc = "Pitch angle"]
13035    pub pitch: f32,
13036    #[doc = "Yaw angle"]
13037    pub yaw: f32,
13038    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x_global, y_global, z_global, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
13039    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13040    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13041    pub covariance: [f32; 21],
13042    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
13043    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13044    pub reset_counter: u8,
13045}
13046impl GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13047    pub const ENCODED_LEN: usize = 117usize;
13048    pub const DEFAULT: Self = Self {
13049        usec: 0_u64,
13050        x: 0.0_f32,
13051        y: 0.0_f32,
13052        z: 0.0_f32,
13053        roll: 0.0_f32,
13054        pitch: 0.0_f32,
13055        yaw: 0.0_f32,
13056        covariance: [0.0_f32; 21usize],
13057        reset_counter: 0_u8,
13058    };
13059    #[cfg(feature = "arbitrary")]
13060    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13061        use arbitrary::{Arbitrary, Unstructured};
13062        let mut buf = [0u8; 1024];
13063        rng.fill_bytes(&mut buf);
13064        let mut unstructured = Unstructured::new(&buf);
13065        Self::arbitrary(&mut unstructured).unwrap_or_default()
13066    }
13067}
13068impl Default for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13069    fn default() -> Self {
13070        Self::DEFAULT.clone()
13071    }
13072}
13073impl MessageData for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13074    type Message = MavMessage;
13075    const ID: u32 = 101u32;
13076    const NAME: &'static str = "GLOBAL_VISION_POSITION_ESTIMATE";
13077    const EXTRA_CRC: u8 = 102u8;
13078    const ENCODED_LEN: usize = 117usize;
13079    fn deser(
13080        _version: MavlinkVersion,
13081        __input: &[u8],
13082    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13083        let avail_len = __input.len();
13084        let mut payload_buf = [0; Self::ENCODED_LEN];
13085        let mut buf = if avail_len < Self::ENCODED_LEN {
13086            payload_buf[0..avail_len].copy_from_slice(__input);
13087            Bytes::new(&payload_buf)
13088        } else {
13089            Bytes::new(__input)
13090        };
13091        let mut __struct = Self::default();
13092        __struct.usec = buf.get_u64_le();
13093        __struct.x = buf.get_f32_le();
13094        __struct.y = buf.get_f32_le();
13095        __struct.z = buf.get_f32_le();
13096        __struct.roll = buf.get_f32_le();
13097        __struct.pitch = buf.get_f32_le();
13098        __struct.yaw = buf.get_f32_le();
13099        for v in &mut __struct.covariance {
13100            let val = buf.get_f32_le();
13101            *v = val;
13102        }
13103        __struct.reset_counter = buf.get_u8();
13104        Ok(__struct)
13105    }
13106    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13107        let mut __tmp = BytesMut::new(bytes);
13108        #[allow(clippy::absurd_extreme_comparisons)]
13109        #[allow(unused_comparisons)]
13110        if __tmp.remaining() < Self::ENCODED_LEN {
13111            panic!(
13112                "buffer is too small (need {} bytes, but got {})",
13113                Self::ENCODED_LEN,
13114                __tmp.remaining(),
13115            )
13116        }
13117        __tmp.put_u64_le(self.usec);
13118        __tmp.put_f32_le(self.x);
13119        __tmp.put_f32_le(self.y);
13120        __tmp.put_f32_le(self.z);
13121        __tmp.put_f32_le(self.roll);
13122        __tmp.put_f32_le(self.pitch);
13123        __tmp.put_f32_le(self.yaw);
13124        for val in &self.covariance {
13125            __tmp.put_f32_le(*val);
13126        }
13127        __tmp.put_u8(self.reset_counter);
13128        if matches!(version, MavlinkVersion::V2) {
13129            let len = __tmp.len();
13130            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13131        } else {
13132            __tmp.len()
13133        }
13134    }
13135}
13136#[doc = "id: 124"]
13137#[doc = "Second GPS data."]
13138#[derive(Debug, Clone, PartialEq)]
13139#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13140#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13141pub struct GPS2_RAW_DATA {
13142    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13143    pub time_usec: u64,
13144    #[doc = "Latitude (WGS84)"]
13145    pub lat: i32,
13146    #[doc = "Longitude (WGS84)"]
13147    pub lon: i32,
13148    #[doc = "Altitude (MSL). Positive for up."]
13149    pub alt: i32,
13150    #[doc = "Age of DGPS info"]
13151    pub dgps_age: u32,
13152    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
13153    pub eph: u16,
13154    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
13155    pub epv: u16,
13156    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
13157    pub vel: u16,
13158    #[doc = "Course over ground (NOT heading, but direction of movement): 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
13159    pub cog: u16,
13160    #[doc = "GPS fix type."]
13161    pub fix_type: GpsFixType,
13162    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
13163    pub satellites_visible: u8,
13164    #[doc = "Number of DGPS satellites"]
13165    pub dgps_numch: u8,
13166    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
13167    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13168    pub yaw: u16,
13169    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
13170    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13171    pub alt_ellipsoid: i32,
13172    #[doc = "Position uncertainty."]
13173    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13174    pub h_acc: u32,
13175    #[doc = "Altitude uncertainty."]
13176    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13177    pub v_acc: u32,
13178    #[doc = "Speed uncertainty."]
13179    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13180    pub vel_acc: u32,
13181    #[doc = "Heading / track uncertainty"]
13182    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13183    pub hdg_acc: u32,
13184}
13185impl GPS2_RAW_DATA {
13186    pub const ENCODED_LEN: usize = 57usize;
13187    pub const DEFAULT: Self = Self {
13188        time_usec: 0_u64,
13189        lat: 0_i32,
13190        lon: 0_i32,
13191        alt: 0_i32,
13192        dgps_age: 0_u32,
13193        eph: 0_u16,
13194        epv: 0_u16,
13195        vel: 0_u16,
13196        cog: 0_u16,
13197        fix_type: GpsFixType::DEFAULT,
13198        satellites_visible: 0_u8,
13199        dgps_numch: 0_u8,
13200        yaw: 0_u16,
13201        alt_ellipsoid: 0_i32,
13202        h_acc: 0_u32,
13203        v_acc: 0_u32,
13204        vel_acc: 0_u32,
13205        hdg_acc: 0_u32,
13206    };
13207    #[cfg(feature = "arbitrary")]
13208    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13209        use arbitrary::{Arbitrary, Unstructured};
13210        let mut buf = [0u8; 1024];
13211        rng.fill_bytes(&mut buf);
13212        let mut unstructured = Unstructured::new(&buf);
13213        Self::arbitrary(&mut unstructured).unwrap_or_default()
13214    }
13215}
13216impl Default for GPS2_RAW_DATA {
13217    fn default() -> Self {
13218        Self::DEFAULT.clone()
13219    }
13220}
13221impl MessageData for GPS2_RAW_DATA {
13222    type Message = MavMessage;
13223    const ID: u32 = 124u32;
13224    const NAME: &'static str = "GPS2_RAW";
13225    const EXTRA_CRC: u8 = 87u8;
13226    const ENCODED_LEN: usize = 57usize;
13227    fn deser(
13228        _version: MavlinkVersion,
13229        __input: &[u8],
13230    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13231        let avail_len = __input.len();
13232        let mut payload_buf = [0; Self::ENCODED_LEN];
13233        let mut buf = if avail_len < Self::ENCODED_LEN {
13234            payload_buf[0..avail_len].copy_from_slice(__input);
13235            Bytes::new(&payload_buf)
13236        } else {
13237            Bytes::new(__input)
13238        };
13239        let mut __struct = Self::default();
13240        __struct.time_usec = buf.get_u64_le();
13241        __struct.lat = buf.get_i32_le();
13242        __struct.lon = buf.get_i32_le();
13243        __struct.alt = buf.get_i32_le();
13244        __struct.dgps_age = buf.get_u32_le();
13245        __struct.eph = buf.get_u16_le();
13246        __struct.epv = buf.get_u16_le();
13247        __struct.vel = buf.get_u16_le();
13248        __struct.cog = buf.get_u16_le();
13249        let tmp = buf.get_u8();
13250        __struct.fix_type =
13251            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13252                enum_type: "GpsFixType",
13253                value: tmp as u32,
13254            })?;
13255        __struct.satellites_visible = buf.get_u8();
13256        __struct.dgps_numch = buf.get_u8();
13257        __struct.yaw = buf.get_u16_le();
13258        __struct.alt_ellipsoid = buf.get_i32_le();
13259        __struct.h_acc = buf.get_u32_le();
13260        __struct.v_acc = buf.get_u32_le();
13261        __struct.vel_acc = buf.get_u32_le();
13262        __struct.hdg_acc = buf.get_u32_le();
13263        Ok(__struct)
13264    }
13265    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13266        let mut __tmp = BytesMut::new(bytes);
13267        #[allow(clippy::absurd_extreme_comparisons)]
13268        #[allow(unused_comparisons)]
13269        if __tmp.remaining() < Self::ENCODED_LEN {
13270            panic!(
13271                "buffer is too small (need {} bytes, but got {})",
13272                Self::ENCODED_LEN,
13273                __tmp.remaining(),
13274            )
13275        }
13276        __tmp.put_u64_le(self.time_usec);
13277        __tmp.put_i32_le(self.lat);
13278        __tmp.put_i32_le(self.lon);
13279        __tmp.put_i32_le(self.alt);
13280        __tmp.put_u32_le(self.dgps_age);
13281        __tmp.put_u16_le(self.eph);
13282        __tmp.put_u16_le(self.epv);
13283        __tmp.put_u16_le(self.vel);
13284        __tmp.put_u16_le(self.cog);
13285        __tmp.put_u8(self.fix_type as u8);
13286        __tmp.put_u8(self.satellites_visible);
13287        __tmp.put_u8(self.dgps_numch);
13288        __tmp.put_u16_le(self.yaw);
13289        __tmp.put_i32_le(self.alt_ellipsoid);
13290        __tmp.put_u32_le(self.h_acc);
13291        __tmp.put_u32_le(self.v_acc);
13292        __tmp.put_u32_le(self.vel_acc);
13293        __tmp.put_u32_le(self.hdg_acc);
13294        if matches!(version, MavlinkVersion::V2) {
13295            let len = __tmp.len();
13296            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13297        } else {
13298            __tmp.len()
13299        }
13300    }
13301}
13302#[doc = "id: 128"]
13303#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
13304#[derive(Debug, Clone, PartialEq)]
13305#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13306#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13307pub struct GPS2_RTK_DATA {
13308    #[doc = "Time since boot of last baseline message received."]
13309    pub time_last_baseline_ms: u32,
13310    #[doc = "GPS Time of Week of last baseline"]
13311    pub tow: u32,
13312    #[doc = "Current baseline in ECEF x or NED north component."]
13313    pub baseline_a_mm: i32,
13314    #[doc = "Current baseline in ECEF y or NED east component."]
13315    pub baseline_b_mm: i32,
13316    #[doc = "Current baseline in ECEF z or NED down component."]
13317    pub baseline_c_mm: i32,
13318    #[doc = "Current estimate of baseline accuracy."]
13319    pub accuracy: u32,
13320    #[doc = "Current number of integer ambiguity hypotheses."]
13321    pub iar_num_hypotheses: i32,
13322    #[doc = "GPS Week Number of last baseline"]
13323    pub wn: u16,
13324    #[doc = "Identification of connected RTK receiver."]
13325    pub rtk_receiver_id: u8,
13326    #[doc = "GPS-specific health report for RTK data."]
13327    pub rtk_health: u8,
13328    #[doc = "Rate of baseline messages being received by GPS"]
13329    pub rtk_rate: u8,
13330    #[doc = "Current number of sats used for RTK calculation."]
13331    pub nsats: u8,
13332    #[doc = "Coordinate system of baseline"]
13333    pub baseline_coords_type: RtkBaselineCoordinateSystem,
13334}
13335impl GPS2_RTK_DATA {
13336    pub const ENCODED_LEN: usize = 35usize;
13337    pub const DEFAULT: Self = Self {
13338        time_last_baseline_ms: 0_u32,
13339        tow: 0_u32,
13340        baseline_a_mm: 0_i32,
13341        baseline_b_mm: 0_i32,
13342        baseline_c_mm: 0_i32,
13343        accuracy: 0_u32,
13344        iar_num_hypotheses: 0_i32,
13345        wn: 0_u16,
13346        rtk_receiver_id: 0_u8,
13347        rtk_health: 0_u8,
13348        rtk_rate: 0_u8,
13349        nsats: 0_u8,
13350        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
13351    };
13352    #[cfg(feature = "arbitrary")]
13353    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13354        use arbitrary::{Arbitrary, Unstructured};
13355        let mut buf = [0u8; 1024];
13356        rng.fill_bytes(&mut buf);
13357        let mut unstructured = Unstructured::new(&buf);
13358        Self::arbitrary(&mut unstructured).unwrap_or_default()
13359    }
13360}
13361impl Default for GPS2_RTK_DATA {
13362    fn default() -> Self {
13363        Self::DEFAULT.clone()
13364    }
13365}
13366impl MessageData for GPS2_RTK_DATA {
13367    type Message = MavMessage;
13368    const ID: u32 = 128u32;
13369    const NAME: &'static str = "GPS2_RTK";
13370    const EXTRA_CRC: u8 = 226u8;
13371    const ENCODED_LEN: usize = 35usize;
13372    fn deser(
13373        _version: MavlinkVersion,
13374        __input: &[u8],
13375    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13376        let avail_len = __input.len();
13377        let mut payload_buf = [0; Self::ENCODED_LEN];
13378        let mut buf = if avail_len < Self::ENCODED_LEN {
13379            payload_buf[0..avail_len].copy_from_slice(__input);
13380            Bytes::new(&payload_buf)
13381        } else {
13382            Bytes::new(__input)
13383        };
13384        let mut __struct = Self::default();
13385        __struct.time_last_baseline_ms = buf.get_u32_le();
13386        __struct.tow = buf.get_u32_le();
13387        __struct.baseline_a_mm = buf.get_i32_le();
13388        __struct.baseline_b_mm = buf.get_i32_le();
13389        __struct.baseline_c_mm = buf.get_i32_le();
13390        __struct.accuracy = buf.get_u32_le();
13391        __struct.iar_num_hypotheses = buf.get_i32_le();
13392        __struct.wn = buf.get_u16_le();
13393        __struct.rtk_receiver_id = buf.get_u8();
13394        __struct.rtk_health = buf.get_u8();
13395        __struct.rtk_rate = buf.get_u8();
13396        __struct.nsats = buf.get_u8();
13397        let tmp = buf.get_u8();
13398        __struct.baseline_coords_type =
13399            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13400                enum_type: "RtkBaselineCoordinateSystem",
13401                value: tmp as u32,
13402            })?;
13403        Ok(__struct)
13404    }
13405    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13406        let mut __tmp = BytesMut::new(bytes);
13407        #[allow(clippy::absurd_extreme_comparisons)]
13408        #[allow(unused_comparisons)]
13409        if __tmp.remaining() < Self::ENCODED_LEN {
13410            panic!(
13411                "buffer is too small (need {} bytes, but got {})",
13412                Self::ENCODED_LEN,
13413                __tmp.remaining(),
13414            )
13415        }
13416        __tmp.put_u32_le(self.time_last_baseline_ms);
13417        __tmp.put_u32_le(self.tow);
13418        __tmp.put_i32_le(self.baseline_a_mm);
13419        __tmp.put_i32_le(self.baseline_b_mm);
13420        __tmp.put_i32_le(self.baseline_c_mm);
13421        __tmp.put_u32_le(self.accuracy);
13422        __tmp.put_i32_le(self.iar_num_hypotheses);
13423        __tmp.put_u16_le(self.wn);
13424        __tmp.put_u8(self.rtk_receiver_id);
13425        __tmp.put_u8(self.rtk_health);
13426        __tmp.put_u8(self.rtk_rate);
13427        __tmp.put_u8(self.nsats);
13428        __tmp.put_u8(self.baseline_coords_type as u8);
13429        if matches!(version, MavlinkVersion::V2) {
13430            let len = __tmp.len();
13431            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13432        } else {
13433            __tmp.len()
13434        }
13435    }
13436}
13437#[doc = "id: 49"]
13438#[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
13439#[derive(Debug, Clone, PartialEq)]
13440#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13441#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13442pub struct GPS_GLOBAL_ORIGIN_DATA {
13443    #[doc = "Latitude (WGS84)"]
13444    pub latitude: i32,
13445    #[doc = "Longitude (WGS84)"]
13446    pub longitude: i32,
13447    #[doc = "Altitude (MSL). Positive for up."]
13448    pub altitude: i32,
13449    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13450    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13451    pub time_usec: u64,
13452}
13453impl GPS_GLOBAL_ORIGIN_DATA {
13454    pub const ENCODED_LEN: usize = 20usize;
13455    pub const DEFAULT: Self = Self {
13456        latitude: 0_i32,
13457        longitude: 0_i32,
13458        altitude: 0_i32,
13459        time_usec: 0_u64,
13460    };
13461    #[cfg(feature = "arbitrary")]
13462    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13463        use arbitrary::{Arbitrary, Unstructured};
13464        let mut buf = [0u8; 1024];
13465        rng.fill_bytes(&mut buf);
13466        let mut unstructured = Unstructured::new(&buf);
13467        Self::arbitrary(&mut unstructured).unwrap_or_default()
13468    }
13469}
13470impl Default for GPS_GLOBAL_ORIGIN_DATA {
13471    fn default() -> Self {
13472        Self::DEFAULT.clone()
13473    }
13474}
13475impl MessageData for GPS_GLOBAL_ORIGIN_DATA {
13476    type Message = MavMessage;
13477    const ID: u32 = 49u32;
13478    const NAME: &'static str = "GPS_GLOBAL_ORIGIN";
13479    const EXTRA_CRC: u8 = 39u8;
13480    const ENCODED_LEN: usize = 20usize;
13481    fn deser(
13482        _version: MavlinkVersion,
13483        __input: &[u8],
13484    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13485        let avail_len = __input.len();
13486        let mut payload_buf = [0; Self::ENCODED_LEN];
13487        let mut buf = if avail_len < Self::ENCODED_LEN {
13488            payload_buf[0..avail_len].copy_from_slice(__input);
13489            Bytes::new(&payload_buf)
13490        } else {
13491            Bytes::new(__input)
13492        };
13493        let mut __struct = Self::default();
13494        __struct.latitude = buf.get_i32_le();
13495        __struct.longitude = buf.get_i32_le();
13496        __struct.altitude = buf.get_i32_le();
13497        __struct.time_usec = buf.get_u64_le();
13498        Ok(__struct)
13499    }
13500    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13501        let mut __tmp = BytesMut::new(bytes);
13502        #[allow(clippy::absurd_extreme_comparisons)]
13503        #[allow(unused_comparisons)]
13504        if __tmp.remaining() < Self::ENCODED_LEN {
13505            panic!(
13506                "buffer is too small (need {} bytes, but got {})",
13507                Self::ENCODED_LEN,
13508                __tmp.remaining(),
13509            )
13510        }
13511        __tmp.put_i32_le(self.latitude);
13512        __tmp.put_i32_le(self.longitude);
13513        __tmp.put_i32_le(self.altitude);
13514        __tmp.put_u64_le(self.time_usec);
13515        if matches!(version, MavlinkVersion::V2) {
13516            let len = __tmp.len();
13517            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13518        } else {
13519            __tmp.len()
13520        }
13521    }
13522}
13523#[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
13524#[doc = "id: 123"]
13525#[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
13526#[derive(Debug, Clone, PartialEq)]
13527#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13528#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13529pub struct GPS_INJECT_DATA_DATA {
13530    #[doc = "System ID"]
13531    pub target_system: u8,
13532    #[doc = "Component ID"]
13533    pub target_component: u8,
13534    #[doc = "Data length"]
13535    pub len: u8,
13536    #[doc = "Raw data (110 is enough for 12 satellites of RTCMv2)"]
13537    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13538    pub data: [u8; 110],
13539}
13540impl GPS_INJECT_DATA_DATA {
13541    pub const ENCODED_LEN: usize = 113usize;
13542    pub const DEFAULT: Self = Self {
13543        target_system: 0_u8,
13544        target_component: 0_u8,
13545        len: 0_u8,
13546        data: [0_u8; 110usize],
13547    };
13548    #[cfg(feature = "arbitrary")]
13549    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13550        use arbitrary::{Arbitrary, Unstructured};
13551        let mut buf = [0u8; 1024];
13552        rng.fill_bytes(&mut buf);
13553        let mut unstructured = Unstructured::new(&buf);
13554        Self::arbitrary(&mut unstructured).unwrap_or_default()
13555    }
13556}
13557impl Default for GPS_INJECT_DATA_DATA {
13558    fn default() -> Self {
13559        Self::DEFAULT.clone()
13560    }
13561}
13562impl MessageData for GPS_INJECT_DATA_DATA {
13563    type Message = MavMessage;
13564    const ID: u32 = 123u32;
13565    const NAME: &'static str = "GPS_INJECT_DATA";
13566    const EXTRA_CRC: u8 = 250u8;
13567    const ENCODED_LEN: usize = 113usize;
13568    fn deser(
13569        _version: MavlinkVersion,
13570        __input: &[u8],
13571    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13572        let avail_len = __input.len();
13573        let mut payload_buf = [0; Self::ENCODED_LEN];
13574        let mut buf = if avail_len < Self::ENCODED_LEN {
13575            payload_buf[0..avail_len].copy_from_slice(__input);
13576            Bytes::new(&payload_buf)
13577        } else {
13578            Bytes::new(__input)
13579        };
13580        let mut __struct = Self::default();
13581        __struct.target_system = buf.get_u8();
13582        __struct.target_component = buf.get_u8();
13583        __struct.len = buf.get_u8();
13584        for v in &mut __struct.data {
13585            let val = buf.get_u8();
13586            *v = val;
13587        }
13588        Ok(__struct)
13589    }
13590    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13591        let mut __tmp = BytesMut::new(bytes);
13592        #[allow(clippy::absurd_extreme_comparisons)]
13593        #[allow(unused_comparisons)]
13594        if __tmp.remaining() < Self::ENCODED_LEN {
13595            panic!(
13596                "buffer is too small (need {} bytes, but got {})",
13597                Self::ENCODED_LEN,
13598                __tmp.remaining(),
13599            )
13600        }
13601        __tmp.put_u8(self.target_system);
13602        __tmp.put_u8(self.target_component);
13603        __tmp.put_u8(self.len);
13604        for val in &self.data {
13605            __tmp.put_u8(*val);
13606        }
13607        if matches!(version, MavlinkVersion::V2) {
13608            let len = __tmp.len();
13609            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13610        } else {
13611            __tmp.len()
13612        }
13613    }
13614}
13615#[doc = "id: 232"]
13616#[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
13617#[derive(Debug, Clone, PartialEq)]
13618#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13619#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13620pub struct GPS_INPUT_DATA {
13621    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13622    pub time_usec: u64,
13623    #[doc = "GPS time (from start of GPS week)"]
13624    pub time_week_ms: u32,
13625    #[doc = "Latitude (WGS84)"]
13626    pub lat: i32,
13627    #[doc = "Longitude (WGS84)"]
13628    pub lon: i32,
13629    #[doc = "Altitude (MSL). Positive for up."]
13630    pub alt: f32,
13631    #[doc = "GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX"]
13632    pub hdop: f32,
13633    #[doc = "GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX"]
13634    pub vdop: f32,
13635    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
13636    pub vn: f32,
13637    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
13638    pub ve: f32,
13639    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
13640    pub vd: f32,
13641    #[doc = "GPS speed accuracy"]
13642    pub speed_accuracy: f32,
13643    #[doc = "GPS horizontal accuracy"]
13644    pub horiz_accuracy: f32,
13645    #[doc = "GPS vertical accuracy"]
13646    pub vert_accuracy: f32,
13647    #[doc = "Bitmap indicating which GPS input flags fields to ignore.  All other fields must be provided."]
13648    pub ignore_flags: GpsInputIgnoreFlags,
13649    #[doc = "GPS week number"]
13650    pub time_week: u16,
13651    #[doc = "ID of the GPS for multiple GPS inputs"]
13652    pub gps_id: u8,
13653    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. 4: 3D with DGPS. 5: 3D with RTK"]
13654    pub fix_type: u8,
13655    #[doc = "Number of satellites visible."]
13656    pub satellites_visible: u8,
13657    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
13658    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13659    pub yaw: u16,
13660}
13661impl GPS_INPUT_DATA {
13662    pub const ENCODED_LEN: usize = 65usize;
13663    pub const DEFAULT: Self = Self {
13664        time_usec: 0_u64,
13665        time_week_ms: 0_u32,
13666        lat: 0_i32,
13667        lon: 0_i32,
13668        alt: 0.0_f32,
13669        hdop: 0.0_f32,
13670        vdop: 0.0_f32,
13671        vn: 0.0_f32,
13672        ve: 0.0_f32,
13673        vd: 0.0_f32,
13674        speed_accuracy: 0.0_f32,
13675        horiz_accuracy: 0.0_f32,
13676        vert_accuracy: 0.0_f32,
13677        ignore_flags: GpsInputIgnoreFlags::DEFAULT,
13678        time_week: 0_u16,
13679        gps_id: 0_u8,
13680        fix_type: 0_u8,
13681        satellites_visible: 0_u8,
13682        yaw: 0_u16,
13683    };
13684    #[cfg(feature = "arbitrary")]
13685    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13686        use arbitrary::{Arbitrary, Unstructured};
13687        let mut buf = [0u8; 1024];
13688        rng.fill_bytes(&mut buf);
13689        let mut unstructured = Unstructured::new(&buf);
13690        Self::arbitrary(&mut unstructured).unwrap_or_default()
13691    }
13692}
13693impl Default for GPS_INPUT_DATA {
13694    fn default() -> Self {
13695        Self::DEFAULT.clone()
13696    }
13697}
13698impl MessageData for GPS_INPUT_DATA {
13699    type Message = MavMessage;
13700    const ID: u32 = 232u32;
13701    const NAME: &'static str = "GPS_INPUT";
13702    const EXTRA_CRC: u8 = 151u8;
13703    const ENCODED_LEN: usize = 65usize;
13704    fn deser(
13705        _version: MavlinkVersion,
13706        __input: &[u8],
13707    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13708        let avail_len = __input.len();
13709        let mut payload_buf = [0; Self::ENCODED_LEN];
13710        let mut buf = if avail_len < Self::ENCODED_LEN {
13711            payload_buf[0..avail_len].copy_from_slice(__input);
13712            Bytes::new(&payload_buf)
13713        } else {
13714            Bytes::new(__input)
13715        };
13716        let mut __struct = Self::default();
13717        __struct.time_usec = buf.get_u64_le();
13718        __struct.time_week_ms = buf.get_u32_le();
13719        __struct.lat = buf.get_i32_le();
13720        __struct.lon = buf.get_i32_le();
13721        __struct.alt = buf.get_f32_le();
13722        __struct.hdop = buf.get_f32_le();
13723        __struct.vdop = buf.get_f32_le();
13724        __struct.vn = buf.get_f32_le();
13725        __struct.ve = buf.get_f32_le();
13726        __struct.vd = buf.get_f32_le();
13727        __struct.speed_accuracy = buf.get_f32_le();
13728        __struct.horiz_accuracy = buf.get_f32_le();
13729        __struct.vert_accuracy = buf.get_f32_le();
13730        let tmp = buf.get_u16_le();
13731        __struct.ignore_flags = GpsInputIgnoreFlags::from_bits(
13732            tmp & GpsInputIgnoreFlags::all().bits(),
13733        )
13734        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13735            flag_type: "GpsInputIgnoreFlags",
13736            value: tmp as u32,
13737        })?;
13738        __struct.time_week = buf.get_u16_le();
13739        __struct.gps_id = buf.get_u8();
13740        __struct.fix_type = buf.get_u8();
13741        __struct.satellites_visible = buf.get_u8();
13742        __struct.yaw = buf.get_u16_le();
13743        Ok(__struct)
13744    }
13745    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13746        let mut __tmp = BytesMut::new(bytes);
13747        #[allow(clippy::absurd_extreme_comparisons)]
13748        #[allow(unused_comparisons)]
13749        if __tmp.remaining() < Self::ENCODED_LEN {
13750            panic!(
13751                "buffer is too small (need {} bytes, but got {})",
13752                Self::ENCODED_LEN,
13753                __tmp.remaining(),
13754            )
13755        }
13756        __tmp.put_u64_le(self.time_usec);
13757        __tmp.put_u32_le(self.time_week_ms);
13758        __tmp.put_i32_le(self.lat);
13759        __tmp.put_i32_le(self.lon);
13760        __tmp.put_f32_le(self.alt);
13761        __tmp.put_f32_le(self.hdop);
13762        __tmp.put_f32_le(self.vdop);
13763        __tmp.put_f32_le(self.vn);
13764        __tmp.put_f32_le(self.ve);
13765        __tmp.put_f32_le(self.vd);
13766        __tmp.put_f32_le(self.speed_accuracy);
13767        __tmp.put_f32_le(self.horiz_accuracy);
13768        __tmp.put_f32_le(self.vert_accuracy);
13769        __tmp.put_u16_le(self.ignore_flags.bits());
13770        __tmp.put_u16_le(self.time_week);
13771        __tmp.put_u8(self.gps_id);
13772        __tmp.put_u8(self.fix_type);
13773        __tmp.put_u8(self.satellites_visible);
13774        __tmp.put_u16_le(self.yaw);
13775        if matches!(version, MavlinkVersion::V2) {
13776            let len = __tmp.len();
13777            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13778        } else {
13779            __tmp.len()
13780        }
13781    }
13782}
13783#[doc = "id: 24"]
13784#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
13785#[derive(Debug, Clone, PartialEq)]
13786#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13787#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13788pub struct GPS_RAW_INT_DATA {
13789    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13790    pub time_usec: u64,
13791    #[doc = "Latitude (WGS84, EGM96 ellipsoid)"]
13792    pub lat: i32,
13793    #[doc = "Longitude (WGS84, EGM96 ellipsoid)"]
13794    pub lon: i32,
13795    #[doc = "Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude."]
13796    pub alt: i32,
13797    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
13798    pub eph: u16,
13799    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
13800    pub epv: u16,
13801    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
13802    pub vel: u16,
13803    #[doc = "Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
13804    pub cog: u16,
13805    #[doc = "GPS fix type."]
13806    pub fix_type: GpsFixType,
13807    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
13808    pub satellites_visible: u8,
13809    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
13810    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13811    pub alt_ellipsoid: i32,
13812    #[doc = "Position uncertainty."]
13813    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13814    pub h_acc: u32,
13815    #[doc = "Altitude uncertainty."]
13816    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13817    pub v_acc: u32,
13818    #[doc = "Speed uncertainty."]
13819    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13820    pub vel_acc: u32,
13821    #[doc = "Heading / track uncertainty"]
13822    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13823    pub hdg_acc: u32,
13824    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
13825    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13826    pub yaw: u16,
13827}
13828impl GPS_RAW_INT_DATA {
13829    pub const ENCODED_LEN: usize = 52usize;
13830    pub const DEFAULT: Self = Self {
13831        time_usec: 0_u64,
13832        lat: 0_i32,
13833        lon: 0_i32,
13834        alt: 0_i32,
13835        eph: 0_u16,
13836        epv: 0_u16,
13837        vel: 0_u16,
13838        cog: 0_u16,
13839        fix_type: GpsFixType::DEFAULT,
13840        satellites_visible: 0_u8,
13841        alt_ellipsoid: 0_i32,
13842        h_acc: 0_u32,
13843        v_acc: 0_u32,
13844        vel_acc: 0_u32,
13845        hdg_acc: 0_u32,
13846        yaw: 0_u16,
13847    };
13848    #[cfg(feature = "arbitrary")]
13849    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13850        use arbitrary::{Arbitrary, Unstructured};
13851        let mut buf = [0u8; 1024];
13852        rng.fill_bytes(&mut buf);
13853        let mut unstructured = Unstructured::new(&buf);
13854        Self::arbitrary(&mut unstructured).unwrap_or_default()
13855    }
13856}
13857impl Default for GPS_RAW_INT_DATA {
13858    fn default() -> Self {
13859        Self::DEFAULT.clone()
13860    }
13861}
13862impl MessageData for GPS_RAW_INT_DATA {
13863    type Message = MavMessage;
13864    const ID: u32 = 24u32;
13865    const NAME: &'static str = "GPS_RAW_INT";
13866    const EXTRA_CRC: u8 = 24u8;
13867    const ENCODED_LEN: usize = 52usize;
13868    fn deser(
13869        _version: MavlinkVersion,
13870        __input: &[u8],
13871    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13872        let avail_len = __input.len();
13873        let mut payload_buf = [0; Self::ENCODED_LEN];
13874        let mut buf = if avail_len < Self::ENCODED_LEN {
13875            payload_buf[0..avail_len].copy_from_slice(__input);
13876            Bytes::new(&payload_buf)
13877        } else {
13878            Bytes::new(__input)
13879        };
13880        let mut __struct = Self::default();
13881        __struct.time_usec = buf.get_u64_le();
13882        __struct.lat = buf.get_i32_le();
13883        __struct.lon = buf.get_i32_le();
13884        __struct.alt = buf.get_i32_le();
13885        __struct.eph = buf.get_u16_le();
13886        __struct.epv = buf.get_u16_le();
13887        __struct.vel = buf.get_u16_le();
13888        __struct.cog = buf.get_u16_le();
13889        let tmp = buf.get_u8();
13890        __struct.fix_type =
13891            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13892                enum_type: "GpsFixType",
13893                value: tmp as u32,
13894            })?;
13895        __struct.satellites_visible = buf.get_u8();
13896        __struct.alt_ellipsoid = buf.get_i32_le();
13897        __struct.h_acc = buf.get_u32_le();
13898        __struct.v_acc = buf.get_u32_le();
13899        __struct.vel_acc = buf.get_u32_le();
13900        __struct.hdg_acc = buf.get_u32_le();
13901        __struct.yaw = buf.get_u16_le();
13902        Ok(__struct)
13903    }
13904    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13905        let mut __tmp = BytesMut::new(bytes);
13906        #[allow(clippy::absurd_extreme_comparisons)]
13907        #[allow(unused_comparisons)]
13908        if __tmp.remaining() < Self::ENCODED_LEN {
13909            panic!(
13910                "buffer is too small (need {} bytes, but got {})",
13911                Self::ENCODED_LEN,
13912                __tmp.remaining(),
13913            )
13914        }
13915        __tmp.put_u64_le(self.time_usec);
13916        __tmp.put_i32_le(self.lat);
13917        __tmp.put_i32_le(self.lon);
13918        __tmp.put_i32_le(self.alt);
13919        __tmp.put_u16_le(self.eph);
13920        __tmp.put_u16_le(self.epv);
13921        __tmp.put_u16_le(self.vel);
13922        __tmp.put_u16_le(self.cog);
13923        __tmp.put_u8(self.fix_type as u8);
13924        __tmp.put_u8(self.satellites_visible);
13925        __tmp.put_i32_le(self.alt_ellipsoid);
13926        __tmp.put_u32_le(self.h_acc);
13927        __tmp.put_u32_le(self.v_acc);
13928        __tmp.put_u32_le(self.vel_acc);
13929        __tmp.put_u32_le(self.hdg_acc);
13930        __tmp.put_u16_le(self.yaw);
13931        if matches!(version, MavlinkVersion::V2) {
13932            let len = __tmp.len();
13933            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13934        } else {
13935            __tmp.len()
13936        }
13937    }
13938}
13939#[doc = "id: 233"]
13940#[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
13941#[derive(Debug, Clone, PartialEq)]
13942#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13943#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13944pub struct GPS_RTCM_DATA_DATA {
13945    #[doc = "LSB: 1 means message is fragmented, next 2 bits are the fragment ID, the remaining 5 bits are used for the sequence ID. Messages are only to be flushed to the GPS when the entire message has been reconstructed on the autopilot. The fragment ID specifies which order the fragments should be assembled into a buffer, while the sequence ID is used to detect a mismatch between different buffers. The buffer is considered fully reconstructed when either all 4 fragments are present, or all the fragments before the first fragment with a non full payload is received. This management is used to ensure that normal GPS operation doesn't corrupt RTCM data, and to recover from a unreliable transport delivery order."]
13946    pub flags: u8,
13947    #[doc = "data length"]
13948    pub len: u8,
13949    #[doc = "RTCM message (may be fragmented)"]
13950    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13951    pub data: [u8; 180],
13952}
13953impl GPS_RTCM_DATA_DATA {
13954    pub const ENCODED_LEN: usize = 182usize;
13955    pub const DEFAULT: Self = Self {
13956        flags: 0_u8,
13957        len: 0_u8,
13958        data: [0_u8; 180usize],
13959    };
13960    #[cfg(feature = "arbitrary")]
13961    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13962        use arbitrary::{Arbitrary, Unstructured};
13963        let mut buf = [0u8; 1024];
13964        rng.fill_bytes(&mut buf);
13965        let mut unstructured = Unstructured::new(&buf);
13966        Self::arbitrary(&mut unstructured).unwrap_or_default()
13967    }
13968}
13969impl Default for GPS_RTCM_DATA_DATA {
13970    fn default() -> Self {
13971        Self::DEFAULT.clone()
13972    }
13973}
13974impl MessageData for GPS_RTCM_DATA_DATA {
13975    type Message = MavMessage;
13976    const ID: u32 = 233u32;
13977    const NAME: &'static str = "GPS_RTCM_DATA";
13978    const EXTRA_CRC: u8 = 35u8;
13979    const ENCODED_LEN: usize = 182usize;
13980    fn deser(
13981        _version: MavlinkVersion,
13982        __input: &[u8],
13983    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13984        let avail_len = __input.len();
13985        let mut payload_buf = [0; Self::ENCODED_LEN];
13986        let mut buf = if avail_len < Self::ENCODED_LEN {
13987            payload_buf[0..avail_len].copy_from_slice(__input);
13988            Bytes::new(&payload_buf)
13989        } else {
13990            Bytes::new(__input)
13991        };
13992        let mut __struct = Self::default();
13993        __struct.flags = buf.get_u8();
13994        __struct.len = buf.get_u8();
13995        for v in &mut __struct.data {
13996            let val = buf.get_u8();
13997            *v = val;
13998        }
13999        Ok(__struct)
14000    }
14001    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14002        let mut __tmp = BytesMut::new(bytes);
14003        #[allow(clippy::absurd_extreme_comparisons)]
14004        #[allow(unused_comparisons)]
14005        if __tmp.remaining() < Self::ENCODED_LEN {
14006            panic!(
14007                "buffer is too small (need {} bytes, but got {})",
14008                Self::ENCODED_LEN,
14009                __tmp.remaining(),
14010            )
14011        }
14012        __tmp.put_u8(self.flags);
14013        __tmp.put_u8(self.len);
14014        for val in &self.data {
14015            __tmp.put_u8(*val);
14016        }
14017        if matches!(version, MavlinkVersion::V2) {
14018            let len = __tmp.len();
14019            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14020        } else {
14021            __tmp.len()
14022        }
14023    }
14024}
14025#[doc = "id: 127"]
14026#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
14027#[derive(Debug, Clone, PartialEq)]
14028#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14029#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14030pub struct GPS_RTK_DATA {
14031    #[doc = "Time since boot of last baseline message received."]
14032    pub time_last_baseline_ms: u32,
14033    #[doc = "GPS Time of Week of last baseline"]
14034    pub tow: u32,
14035    #[doc = "Current baseline in ECEF x or NED north component."]
14036    pub baseline_a_mm: i32,
14037    #[doc = "Current baseline in ECEF y or NED east component."]
14038    pub baseline_b_mm: i32,
14039    #[doc = "Current baseline in ECEF z or NED down component."]
14040    pub baseline_c_mm: i32,
14041    #[doc = "Current estimate of baseline accuracy."]
14042    pub accuracy: u32,
14043    #[doc = "Current number of integer ambiguity hypotheses."]
14044    pub iar_num_hypotheses: i32,
14045    #[doc = "GPS Week Number of last baseline"]
14046    pub wn: u16,
14047    #[doc = "Identification of connected RTK receiver."]
14048    pub rtk_receiver_id: u8,
14049    #[doc = "GPS-specific health report for RTK data."]
14050    pub rtk_health: u8,
14051    #[doc = "Rate of baseline messages being received by GPS"]
14052    pub rtk_rate: u8,
14053    #[doc = "Current number of sats used for RTK calculation."]
14054    pub nsats: u8,
14055    #[doc = "Coordinate system of baseline"]
14056    pub baseline_coords_type: RtkBaselineCoordinateSystem,
14057}
14058impl GPS_RTK_DATA {
14059    pub const ENCODED_LEN: usize = 35usize;
14060    pub const DEFAULT: Self = Self {
14061        time_last_baseline_ms: 0_u32,
14062        tow: 0_u32,
14063        baseline_a_mm: 0_i32,
14064        baseline_b_mm: 0_i32,
14065        baseline_c_mm: 0_i32,
14066        accuracy: 0_u32,
14067        iar_num_hypotheses: 0_i32,
14068        wn: 0_u16,
14069        rtk_receiver_id: 0_u8,
14070        rtk_health: 0_u8,
14071        rtk_rate: 0_u8,
14072        nsats: 0_u8,
14073        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
14074    };
14075    #[cfg(feature = "arbitrary")]
14076    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14077        use arbitrary::{Arbitrary, Unstructured};
14078        let mut buf = [0u8; 1024];
14079        rng.fill_bytes(&mut buf);
14080        let mut unstructured = Unstructured::new(&buf);
14081        Self::arbitrary(&mut unstructured).unwrap_or_default()
14082    }
14083}
14084impl Default for GPS_RTK_DATA {
14085    fn default() -> Self {
14086        Self::DEFAULT.clone()
14087    }
14088}
14089impl MessageData for GPS_RTK_DATA {
14090    type Message = MavMessage;
14091    const ID: u32 = 127u32;
14092    const NAME: &'static str = "GPS_RTK";
14093    const EXTRA_CRC: u8 = 25u8;
14094    const ENCODED_LEN: usize = 35usize;
14095    fn deser(
14096        _version: MavlinkVersion,
14097        __input: &[u8],
14098    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14099        let avail_len = __input.len();
14100        let mut payload_buf = [0; Self::ENCODED_LEN];
14101        let mut buf = if avail_len < Self::ENCODED_LEN {
14102            payload_buf[0..avail_len].copy_from_slice(__input);
14103            Bytes::new(&payload_buf)
14104        } else {
14105            Bytes::new(__input)
14106        };
14107        let mut __struct = Self::default();
14108        __struct.time_last_baseline_ms = buf.get_u32_le();
14109        __struct.tow = buf.get_u32_le();
14110        __struct.baseline_a_mm = buf.get_i32_le();
14111        __struct.baseline_b_mm = buf.get_i32_le();
14112        __struct.baseline_c_mm = buf.get_i32_le();
14113        __struct.accuracy = buf.get_u32_le();
14114        __struct.iar_num_hypotheses = buf.get_i32_le();
14115        __struct.wn = buf.get_u16_le();
14116        __struct.rtk_receiver_id = buf.get_u8();
14117        __struct.rtk_health = buf.get_u8();
14118        __struct.rtk_rate = buf.get_u8();
14119        __struct.nsats = buf.get_u8();
14120        let tmp = buf.get_u8();
14121        __struct.baseline_coords_type =
14122            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14123                enum_type: "RtkBaselineCoordinateSystem",
14124                value: tmp as u32,
14125            })?;
14126        Ok(__struct)
14127    }
14128    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14129        let mut __tmp = BytesMut::new(bytes);
14130        #[allow(clippy::absurd_extreme_comparisons)]
14131        #[allow(unused_comparisons)]
14132        if __tmp.remaining() < Self::ENCODED_LEN {
14133            panic!(
14134                "buffer is too small (need {} bytes, but got {})",
14135                Self::ENCODED_LEN,
14136                __tmp.remaining(),
14137            )
14138        }
14139        __tmp.put_u32_le(self.time_last_baseline_ms);
14140        __tmp.put_u32_le(self.tow);
14141        __tmp.put_i32_le(self.baseline_a_mm);
14142        __tmp.put_i32_le(self.baseline_b_mm);
14143        __tmp.put_i32_le(self.baseline_c_mm);
14144        __tmp.put_u32_le(self.accuracy);
14145        __tmp.put_i32_le(self.iar_num_hypotheses);
14146        __tmp.put_u16_le(self.wn);
14147        __tmp.put_u8(self.rtk_receiver_id);
14148        __tmp.put_u8(self.rtk_health);
14149        __tmp.put_u8(self.rtk_rate);
14150        __tmp.put_u8(self.nsats);
14151        __tmp.put_u8(self.baseline_coords_type as u8);
14152        if matches!(version, MavlinkVersion::V2) {
14153            let len = __tmp.len();
14154            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14155        } else {
14156            __tmp.len()
14157        }
14158    }
14159}
14160#[doc = "id: 25"]
14161#[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
14162#[derive(Debug, Clone, PartialEq)]
14163#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14164#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14165pub struct GPS_STATUS_DATA {
14166    #[doc = "Number of satellites visible"]
14167    pub satellites_visible: u8,
14168    #[doc = "Global satellite ID"]
14169    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14170    pub satellite_prn: [u8; 20],
14171    #[doc = "0: Satellite not used, 1: used for localization"]
14172    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14173    pub satellite_used: [u8; 20],
14174    #[doc = "Elevation (0: right on top of receiver, 90: on the horizon) of satellite"]
14175    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14176    pub satellite_elevation: [u8; 20],
14177    #[doc = "Direction of satellite, 0: 0 deg, 255: 360 deg."]
14178    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14179    pub satellite_azimuth: [u8; 20],
14180    #[doc = "Signal to noise ratio of satellite"]
14181    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14182    pub satellite_snr: [u8; 20],
14183}
14184impl GPS_STATUS_DATA {
14185    pub const ENCODED_LEN: usize = 101usize;
14186    pub const DEFAULT: Self = Self {
14187        satellites_visible: 0_u8,
14188        satellite_prn: [0_u8; 20usize],
14189        satellite_used: [0_u8; 20usize],
14190        satellite_elevation: [0_u8; 20usize],
14191        satellite_azimuth: [0_u8; 20usize],
14192        satellite_snr: [0_u8; 20usize],
14193    };
14194    #[cfg(feature = "arbitrary")]
14195    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14196        use arbitrary::{Arbitrary, Unstructured};
14197        let mut buf = [0u8; 1024];
14198        rng.fill_bytes(&mut buf);
14199        let mut unstructured = Unstructured::new(&buf);
14200        Self::arbitrary(&mut unstructured).unwrap_or_default()
14201    }
14202}
14203impl Default for GPS_STATUS_DATA {
14204    fn default() -> Self {
14205        Self::DEFAULT.clone()
14206    }
14207}
14208impl MessageData for GPS_STATUS_DATA {
14209    type Message = MavMessage;
14210    const ID: u32 = 25u32;
14211    const NAME: &'static str = "GPS_STATUS";
14212    const EXTRA_CRC: u8 = 23u8;
14213    const ENCODED_LEN: usize = 101usize;
14214    fn deser(
14215        _version: MavlinkVersion,
14216        __input: &[u8],
14217    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14218        let avail_len = __input.len();
14219        let mut payload_buf = [0; Self::ENCODED_LEN];
14220        let mut buf = if avail_len < Self::ENCODED_LEN {
14221            payload_buf[0..avail_len].copy_from_slice(__input);
14222            Bytes::new(&payload_buf)
14223        } else {
14224            Bytes::new(__input)
14225        };
14226        let mut __struct = Self::default();
14227        __struct.satellites_visible = buf.get_u8();
14228        for v in &mut __struct.satellite_prn {
14229            let val = buf.get_u8();
14230            *v = val;
14231        }
14232        for v in &mut __struct.satellite_used {
14233            let val = buf.get_u8();
14234            *v = val;
14235        }
14236        for v in &mut __struct.satellite_elevation {
14237            let val = buf.get_u8();
14238            *v = val;
14239        }
14240        for v in &mut __struct.satellite_azimuth {
14241            let val = buf.get_u8();
14242            *v = val;
14243        }
14244        for v in &mut __struct.satellite_snr {
14245            let val = buf.get_u8();
14246            *v = val;
14247        }
14248        Ok(__struct)
14249    }
14250    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14251        let mut __tmp = BytesMut::new(bytes);
14252        #[allow(clippy::absurd_extreme_comparisons)]
14253        #[allow(unused_comparisons)]
14254        if __tmp.remaining() < Self::ENCODED_LEN {
14255            panic!(
14256                "buffer is too small (need {} bytes, but got {})",
14257                Self::ENCODED_LEN,
14258                __tmp.remaining(),
14259            )
14260        }
14261        __tmp.put_u8(self.satellites_visible);
14262        for val in &self.satellite_prn {
14263            __tmp.put_u8(*val);
14264        }
14265        for val in &self.satellite_used {
14266            __tmp.put_u8(*val);
14267        }
14268        for val in &self.satellite_elevation {
14269            __tmp.put_u8(*val);
14270        }
14271        for val in &self.satellite_azimuth {
14272            __tmp.put_u8(*val);
14273        }
14274        for val in &self.satellite_snr {
14275            __tmp.put_u8(*val);
14276        }
14277        if matches!(version, MavlinkVersion::V2) {
14278            let len = __tmp.len();
14279            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14280        } else {
14281            __tmp.len()
14282        }
14283    }
14284}
14285#[doc = "id: 0"]
14286#[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
14287#[derive(Debug, Clone, PartialEq)]
14288#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14289#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14290pub struct HEARTBEAT_DATA {
14291    #[doc = "A bitfield for use for autopilot-specific flags"]
14292    pub custom_mode: u32,
14293    #[doc = "Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type."]
14294    pub mavtype: MavType,
14295    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
14296    pub autopilot: MavAutopilot,
14297    #[doc = "System mode bitmap."]
14298    pub base_mode: MavModeFlag,
14299    #[doc = "System status flag."]
14300    pub system_status: MavState,
14301    #[doc = "MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version"]
14302    pub mavlink_version: u8,
14303}
14304impl HEARTBEAT_DATA {
14305    pub const ENCODED_LEN: usize = 9usize;
14306    pub const DEFAULT: Self = Self {
14307        custom_mode: 0_u32,
14308        mavtype: MavType::DEFAULT,
14309        autopilot: MavAutopilot::DEFAULT,
14310        base_mode: MavModeFlag::DEFAULT,
14311        system_status: MavState::DEFAULT,
14312        mavlink_version: 0_u8,
14313    };
14314    #[cfg(feature = "arbitrary")]
14315    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14316        use arbitrary::{Arbitrary, Unstructured};
14317        let mut buf = [0u8; 1024];
14318        rng.fill_bytes(&mut buf);
14319        let mut unstructured = Unstructured::new(&buf);
14320        Self::arbitrary(&mut unstructured).unwrap_or_default()
14321    }
14322}
14323impl Default for HEARTBEAT_DATA {
14324    fn default() -> Self {
14325        Self::DEFAULT.clone()
14326    }
14327}
14328impl MessageData for HEARTBEAT_DATA {
14329    type Message = MavMessage;
14330    const ID: u32 = 0u32;
14331    const NAME: &'static str = "HEARTBEAT";
14332    const EXTRA_CRC: u8 = 50u8;
14333    const ENCODED_LEN: usize = 9usize;
14334    fn deser(
14335        _version: MavlinkVersion,
14336        __input: &[u8],
14337    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14338        let avail_len = __input.len();
14339        let mut payload_buf = [0; Self::ENCODED_LEN];
14340        let mut buf = if avail_len < Self::ENCODED_LEN {
14341            payload_buf[0..avail_len].copy_from_slice(__input);
14342            Bytes::new(&payload_buf)
14343        } else {
14344            Bytes::new(__input)
14345        };
14346        let mut __struct = Self::default();
14347        __struct.custom_mode = buf.get_u32_le();
14348        let tmp = buf.get_u8();
14349        __struct.mavtype =
14350            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14351                enum_type: "MavType",
14352                value: tmp as u32,
14353            })?;
14354        let tmp = buf.get_u8();
14355        __struct.autopilot =
14356            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14357                enum_type: "MavAutopilot",
14358                value: tmp as u32,
14359            })?;
14360        let tmp = buf.get_u8();
14361        __struct.base_mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
14362            ::mavlink_core::error::ParserError::InvalidFlag {
14363                flag_type: "MavModeFlag",
14364                value: tmp as u32,
14365            },
14366        )?;
14367        let tmp = buf.get_u8();
14368        __struct.system_status =
14369            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14370                enum_type: "MavState",
14371                value: tmp as u32,
14372            })?;
14373        __struct.mavlink_version = buf.get_u8();
14374        Ok(__struct)
14375    }
14376    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14377        let mut __tmp = BytesMut::new(bytes);
14378        #[allow(clippy::absurd_extreme_comparisons)]
14379        #[allow(unused_comparisons)]
14380        if __tmp.remaining() < Self::ENCODED_LEN {
14381            panic!(
14382                "buffer is too small (need {} bytes, but got {})",
14383                Self::ENCODED_LEN,
14384                __tmp.remaining(),
14385            )
14386        }
14387        __tmp.put_u32_le(self.custom_mode);
14388        __tmp.put_u8(self.mavtype as u8);
14389        __tmp.put_u8(self.autopilot as u8);
14390        __tmp.put_u8(self.base_mode.bits());
14391        __tmp.put_u8(self.system_status as u8);
14392        __tmp.put_u8(self.mavlink_version);
14393        if matches!(version, MavlinkVersion::V2) {
14394            let len = __tmp.len();
14395            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14396        } else {
14397            __tmp.len()
14398        }
14399    }
14400}
14401#[doc = "id: 105"]
14402#[doc = "The IMU readings in SI units in NED body frame."]
14403#[derive(Debug, Clone, PartialEq)]
14404#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14405#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14406pub struct HIGHRES_IMU_DATA {
14407    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14408    pub time_usec: u64,
14409    #[doc = "X acceleration"]
14410    pub xacc: f32,
14411    #[doc = "Y acceleration"]
14412    pub yacc: f32,
14413    #[doc = "Z acceleration"]
14414    pub zacc: f32,
14415    #[doc = "Angular speed around X axis"]
14416    pub xgyro: f32,
14417    #[doc = "Angular speed around Y axis"]
14418    pub ygyro: f32,
14419    #[doc = "Angular speed around Z axis"]
14420    pub zgyro: f32,
14421    #[doc = "X Magnetic field"]
14422    pub xmag: f32,
14423    #[doc = "Y Magnetic field"]
14424    pub ymag: f32,
14425    #[doc = "Z Magnetic field"]
14426    pub zmag: f32,
14427    #[doc = "Absolute pressure"]
14428    pub abs_pressure: f32,
14429    #[doc = "Differential pressure"]
14430    pub diff_pressure: f32,
14431    #[doc = "Altitude calculated from pressure"]
14432    pub pressure_alt: f32,
14433    #[doc = "Temperature"]
14434    pub temperature: f32,
14435    #[doc = "Bitmap for fields that have updated since last message"]
14436    pub fields_updated: HighresImuUpdatedFlags,
14437    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
14438    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14439    pub id: u8,
14440}
14441impl HIGHRES_IMU_DATA {
14442    pub const ENCODED_LEN: usize = 63usize;
14443    pub const DEFAULT: Self = Self {
14444        time_usec: 0_u64,
14445        xacc: 0.0_f32,
14446        yacc: 0.0_f32,
14447        zacc: 0.0_f32,
14448        xgyro: 0.0_f32,
14449        ygyro: 0.0_f32,
14450        zgyro: 0.0_f32,
14451        xmag: 0.0_f32,
14452        ymag: 0.0_f32,
14453        zmag: 0.0_f32,
14454        abs_pressure: 0.0_f32,
14455        diff_pressure: 0.0_f32,
14456        pressure_alt: 0.0_f32,
14457        temperature: 0.0_f32,
14458        fields_updated: HighresImuUpdatedFlags::DEFAULT,
14459        id: 0_u8,
14460    };
14461    #[cfg(feature = "arbitrary")]
14462    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14463        use arbitrary::{Arbitrary, Unstructured};
14464        let mut buf = [0u8; 1024];
14465        rng.fill_bytes(&mut buf);
14466        let mut unstructured = Unstructured::new(&buf);
14467        Self::arbitrary(&mut unstructured).unwrap_or_default()
14468    }
14469}
14470impl Default for HIGHRES_IMU_DATA {
14471    fn default() -> Self {
14472        Self::DEFAULT.clone()
14473    }
14474}
14475impl MessageData for HIGHRES_IMU_DATA {
14476    type Message = MavMessage;
14477    const ID: u32 = 105u32;
14478    const NAME: &'static str = "HIGHRES_IMU";
14479    const EXTRA_CRC: u8 = 93u8;
14480    const ENCODED_LEN: usize = 63usize;
14481    fn deser(
14482        _version: MavlinkVersion,
14483        __input: &[u8],
14484    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14485        let avail_len = __input.len();
14486        let mut payload_buf = [0; Self::ENCODED_LEN];
14487        let mut buf = if avail_len < Self::ENCODED_LEN {
14488            payload_buf[0..avail_len].copy_from_slice(__input);
14489            Bytes::new(&payload_buf)
14490        } else {
14491            Bytes::new(__input)
14492        };
14493        let mut __struct = Self::default();
14494        __struct.time_usec = buf.get_u64_le();
14495        __struct.xacc = buf.get_f32_le();
14496        __struct.yacc = buf.get_f32_le();
14497        __struct.zacc = buf.get_f32_le();
14498        __struct.xgyro = buf.get_f32_le();
14499        __struct.ygyro = buf.get_f32_le();
14500        __struct.zgyro = buf.get_f32_le();
14501        __struct.xmag = buf.get_f32_le();
14502        __struct.ymag = buf.get_f32_le();
14503        __struct.zmag = buf.get_f32_le();
14504        __struct.abs_pressure = buf.get_f32_le();
14505        __struct.diff_pressure = buf.get_f32_le();
14506        __struct.pressure_alt = buf.get_f32_le();
14507        __struct.temperature = buf.get_f32_le();
14508        let tmp = buf.get_u16_le();
14509        __struct.fields_updated = HighresImuUpdatedFlags::from_bits(
14510            tmp & HighresImuUpdatedFlags::all().bits(),
14511        )
14512        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14513            flag_type: "HighresImuUpdatedFlags",
14514            value: tmp as u32,
14515        })?;
14516        __struct.id = buf.get_u8();
14517        Ok(__struct)
14518    }
14519    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14520        let mut __tmp = BytesMut::new(bytes);
14521        #[allow(clippy::absurd_extreme_comparisons)]
14522        #[allow(unused_comparisons)]
14523        if __tmp.remaining() < Self::ENCODED_LEN {
14524            panic!(
14525                "buffer is too small (need {} bytes, but got {})",
14526                Self::ENCODED_LEN,
14527                __tmp.remaining(),
14528            )
14529        }
14530        __tmp.put_u64_le(self.time_usec);
14531        __tmp.put_f32_le(self.xacc);
14532        __tmp.put_f32_le(self.yacc);
14533        __tmp.put_f32_le(self.zacc);
14534        __tmp.put_f32_le(self.xgyro);
14535        __tmp.put_f32_le(self.ygyro);
14536        __tmp.put_f32_le(self.zgyro);
14537        __tmp.put_f32_le(self.xmag);
14538        __tmp.put_f32_le(self.ymag);
14539        __tmp.put_f32_le(self.zmag);
14540        __tmp.put_f32_le(self.abs_pressure);
14541        __tmp.put_f32_le(self.diff_pressure);
14542        __tmp.put_f32_le(self.pressure_alt);
14543        __tmp.put_f32_le(self.temperature);
14544        __tmp.put_u16_le(self.fields_updated.bits());
14545        __tmp.put_u8(self.id);
14546        if matches!(version, MavlinkVersion::V2) {
14547            let len = __tmp.len();
14548            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14549        } else {
14550            __tmp.len()
14551        }
14552    }
14553}
14554#[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
14555#[doc = "id: 234"]
14556#[doc = "Message appropriate for high latency connections like Iridium."]
14557#[derive(Debug, Clone, PartialEq)]
14558#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14559#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14560pub struct HIGH_LATENCY_DATA {
14561    #[doc = "A bitfield for use for autopilot-specific flags."]
14562    pub custom_mode: u32,
14563    #[doc = "Latitude"]
14564    pub latitude: i32,
14565    #[doc = "Longitude"]
14566    pub longitude: i32,
14567    #[doc = "roll"]
14568    pub roll: i16,
14569    #[doc = "pitch"]
14570    pub pitch: i16,
14571    #[doc = "heading"]
14572    pub heading: u16,
14573    #[doc = "heading setpoint"]
14574    pub heading_sp: i16,
14575    #[doc = "Altitude above mean sea level"]
14576    pub altitude_amsl: i16,
14577    #[doc = "Altitude setpoint relative to the home position"]
14578    pub altitude_sp: i16,
14579    #[doc = "distance to target"]
14580    pub wp_distance: u16,
14581    #[doc = "Bitmap of enabled system modes."]
14582    pub base_mode: MavModeFlag,
14583    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
14584    pub landed_state: MavLandedState,
14585    #[doc = "throttle (percentage)"]
14586    pub throttle: i8,
14587    #[doc = "airspeed"]
14588    pub airspeed: u8,
14589    #[doc = "airspeed setpoint"]
14590    pub airspeed_sp: u8,
14591    #[doc = "groundspeed"]
14592    pub groundspeed: u8,
14593    #[doc = "climb rate"]
14594    pub climb_rate: i8,
14595    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
14596    pub gps_nsat: u8,
14597    #[doc = "GPS Fix type."]
14598    pub gps_fix_type: GpsFixType,
14599    #[doc = "Remaining battery (percentage)"]
14600    pub battery_remaining: u8,
14601    #[doc = "Autopilot temperature (degrees C)"]
14602    pub temperature: i8,
14603    #[doc = "Air temperature (degrees C) from airspeed sensor"]
14604    pub temperature_air: i8,
14605    #[doc = "failsafe (each bit represents a failsafe where 0=ok, 1=failsafe active (bit0:RC, bit1:batt, bit2:GPS, bit3:GCS, bit4:fence)"]
14606    pub failsafe: u8,
14607    #[doc = "current waypoint number"]
14608    pub wp_num: u8,
14609}
14610impl HIGH_LATENCY_DATA {
14611    pub const ENCODED_LEN: usize = 40usize;
14612    pub const DEFAULT: Self = Self {
14613        custom_mode: 0_u32,
14614        latitude: 0_i32,
14615        longitude: 0_i32,
14616        roll: 0_i16,
14617        pitch: 0_i16,
14618        heading: 0_u16,
14619        heading_sp: 0_i16,
14620        altitude_amsl: 0_i16,
14621        altitude_sp: 0_i16,
14622        wp_distance: 0_u16,
14623        base_mode: MavModeFlag::DEFAULT,
14624        landed_state: MavLandedState::DEFAULT,
14625        throttle: 0_i8,
14626        airspeed: 0_u8,
14627        airspeed_sp: 0_u8,
14628        groundspeed: 0_u8,
14629        climb_rate: 0_i8,
14630        gps_nsat: 0_u8,
14631        gps_fix_type: GpsFixType::DEFAULT,
14632        battery_remaining: 0_u8,
14633        temperature: 0_i8,
14634        temperature_air: 0_i8,
14635        failsafe: 0_u8,
14636        wp_num: 0_u8,
14637    };
14638    #[cfg(feature = "arbitrary")]
14639    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14640        use arbitrary::{Arbitrary, Unstructured};
14641        let mut buf = [0u8; 1024];
14642        rng.fill_bytes(&mut buf);
14643        let mut unstructured = Unstructured::new(&buf);
14644        Self::arbitrary(&mut unstructured).unwrap_or_default()
14645    }
14646}
14647impl Default for HIGH_LATENCY_DATA {
14648    fn default() -> Self {
14649        Self::DEFAULT.clone()
14650    }
14651}
14652impl MessageData for HIGH_LATENCY_DATA {
14653    type Message = MavMessage;
14654    const ID: u32 = 234u32;
14655    const NAME: &'static str = "HIGH_LATENCY";
14656    const EXTRA_CRC: u8 = 150u8;
14657    const ENCODED_LEN: usize = 40usize;
14658    fn deser(
14659        _version: MavlinkVersion,
14660        __input: &[u8],
14661    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14662        let avail_len = __input.len();
14663        let mut payload_buf = [0; Self::ENCODED_LEN];
14664        let mut buf = if avail_len < Self::ENCODED_LEN {
14665            payload_buf[0..avail_len].copy_from_slice(__input);
14666            Bytes::new(&payload_buf)
14667        } else {
14668            Bytes::new(__input)
14669        };
14670        let mut __struct = Self::default();
14671        __struct.custom_mode = buf.get_u32_le();
14672        __struct.latitude = buf.get_i32_le();
14673        __struct.longitude = buf.get_i32_le();
14674        __struct.roll = buf.get_i16_le();
14675        __struct.pitch = buf.get_i16_le();
14676        __struct.heading = buf.get_u16_le();
14677        __struct.heading_sp = buf.get_i16_le();
14678        __struct.altitude_amsl = buf.get_i16_le();
14679        __struct.altitude_sp = buf.get_i16_le();
14680        __struct.wp_distance = buf.get_u16_le();
14681        let tmp = buf.get_u8();
14682        __struct.base_mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
14683            ::mavlink_core::error::ParserError::InvalidFlag {
14684                flag_type: "MavModeFlag",
14685                value: tmp as u32,
14686            },
14687        )?;
14688        let tmp = buf.get_u8();
14689        __struct.landed_state =
14690            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14691                enum_type: "MavLandedState",
14692                value: tmp as u32,
14693            })?;
14694        __struct.throttle = buf.get_i8();
14695        __struct.airspeed = buf.get_u8();
14696        __struct.airspeed_sp = buf.get_u8();
14697        __struct.groundspeed = buf.get_u8();
14698        __struct.climb_rate = buf.get_i8();
14699        __struct.gps_nsat = buf.get_u8();
14700        let tmp = buf.get_u8();
14701        __struct.gps_fix_type =
14702            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14703                enum_type: "GpsFixType",
14704                value: tmp as u32,
14705            })?;
14706        __struct.battery_remaining = buf.get_u8();
14707        __struct.temperature = buf.get_i8();
14708        __struct.temperature_air = buf.get_i8();
14709        __struct.failsafe = buf.get_u8();
14710        __struct.wp_num = buf.get_u8();
14711        Ok(__struct)
14712    }
14713    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14714        let mut __tmp = BytesMut::new(bytes);
14715        #[allow(clippy::absurd_extreme_comparisons)]
14716        #[allow(unused_comparisons)]
14717        if __tmp.remaining() < Self::ENCODED_LEN {
14718            panic!(
14719                "buffer is too small (need {} bytes, but got {})",
14720                Self::ENCODED_LEN,
14721                __tmp.remaining(),
14722            )
14723        }
14724        __tmp.put_u32_le(self.custom_mode);
14725        __tmp.put_i32_le(self.latitude);
14726        __tmp.put_i32_le(self.longitude);
14727        __tmp.put_i16_le(self.roll);
14728        __tmp.put_i16_le(self.pitch);
14729        __tmp.put_u16_le(self.heading);
14730        __tmp.put_i16_le(self.heading_sp);
14731        __tmp.put_i16_le(self.altitude_amsl);
14732        __tmp.put_i16_le(self.altitude_sp);
14733        __tmp.put_u16_le(self.wp_distance);
14734        __tmp.put_u8(self.base_mode.bits());
14735        __tmp.put_u8(self.landed_state as u8);
14736        __tmp.put_i8(self.throttle);
14737        __tmp.put_u8(self.airspeed);
14738        __tmp.put_u8(self.airspeed_sp);
14739        __tmp.put_u8(self.groundspeed);
14740        __tmp.put_i8(self.climb_rate);
14741        __tmp.put_u8(self.gps_nsat);
14742        __tmp.put_u8(self.gps_fix_type as u8);
14743        __tmp.put_u8(self.battery_remaining);
14744        __tmp.put_i8(self.temperature);
14745        __tmp.put_i8(self.temperature_air);
14746        __tmp.put_u8(self.failsafe);
14747        __tmp.put_u8(self.wp_num);
14748        if matches!(version, MavlinkVersion::V2) {
14749            let len = __tmp.len();
14750            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14751        } else {
14752            __tmp.len()
14753        }
14754    }
14755}
14756#[doc = "id: 235"]
14757#[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
14758#[derive(Debug, Clone, PartialEq)]
14759#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14760#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14761pub struct HIGH_LATENCY2_DATA {
14762    #[doc = "Timestamp (milliseconds since boot or Unix epoch)"]
14763    pub timestamp: u32,
14764    #[doc = "Latitude"]
14765    pub latitude: i32,
14766    #[doc = "Longitude"]
14767    pub longitude: i32,
14768    #[doc = "A bitfield for use for autopilot-specific flags (2 byte version)."]
14769    pub custom_mode: u16,
14770    #[doc = "Altitude above mean sea level"]
14771    pub altitude: i16,
14772    #[doc = "Altitude setpoint"]
14773    pub target_altitude: i16,
14774    #[doc = "Distance to target waypoint or position"]
14775    pub target_distance: u16,
14776    #[doc = "Current waypoint number"]
14777    pub wp_num: u16,
14778    #[doc = "Bitmap of failure flags."]
14779    pub failure_flags: HlFailureFlag,
14780    #[doc = "Type of the MAV (quadrotor, helicopter, etc.)"]
14781    pub mavtype: MavType,
14782    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
14783    pub autopilot: MavAutopilot,
14784    #[doc = "Heading"]
14785    pub heading: u8,
14786    #[doc = "Heading setpoint"]
14787    pub target_heading: u8,
14788    #[doc = "Throttle"]
14789    pub throttle: u8,
14790    #[doc = "Airspeed"]
14791    pub airspeed: u8,
14792    #[doc = "Airspeed setpoint"]
14793    pub airspeed_sp: u8,
14794    #[doc = "Groundspeed"]
14795    pub groundspeed: u8,
14796    #[doc = "Windspeed"]
14797    pub windspeed: u8,
14798    #[doc = "Wind heading"]
14799    pub wind_heading: u8,
14800    #[doc = "Maximum error horizontal position since last message"]
14801    pub eph: u8,
14802    #[doc = "Maximum error vertical position since last message"]
14803    pub epv: u8,
14804    #[doc = "Air temperature"]
14805    pub temperature_air: i8,
14806    #[doc = "Maximum climb rate magnitude since last message"]
14807    pub climb_rate: i8,
14808    #[doc = "Battery level (-1 if field not provided)."]
14809    pub battery: i8,
14810    #[doc = "Field for custom payload."]
14811    pub custom0: i8,
14812    #[doc = "Field for custom payload."]
14813    pub custom1: i8,
14814    #[doc = "Field for custom payload."]
14815    pub custom2: i8,
14816}
14817impl HIGH_LATENCY2_DATA {
14818    pub const ENCODED_LEN: usize = 42usize;
14819    pub const DEFAULT: Self = Self {
14820        timestamp: 0_u32,
14821        latitude: 0_i32,
14822        longitude: 0_i32,
14823        custom_mode: 0_u16,
14824        altitude: 0_i16,
14825        target_altitude: 0_i16,
14826        target_distance: 0_u16,
14827        wp_num: 0_u16,
14828        failure_flags: HlFailureFlag::DEFAULT,
14829        mavtype: MavType::DEFAULT,
14830        autopilot: MavAutopilot::DEFAULT,
14831        heading: 0_u8,
14832        target_heading: 0_u8,
14833        throttle: 0_u8,
14834        airspeed: 0_u8,
14835        airspeed_sp: 0_u8,
14836        groundspeed: 0_u8,
14837        windspeed: 0_u8,
14838        wind_heading: 0_u8,
14839        eph: 0_u8,
14840        epv: 0_u8,
14841        temperature_air: 0_i8,
14842        climb_rate: 0_i8,
14843        battery: 0_i8,
14844        custom0: 0_i8,
14845        custom1: 0_i8,
14846        custom2: 0_i8,
14847    };
14848    #[cfg(feature = "arbitrary")]
14849    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14850        use arbitrary::{Arbitrary, Unstructured};
14851        let mut buf = [0u8; 1024];
14852        rng.fill_bytes(&mut buf);
14853        let mut unstructured = Unstructured::new(&buf);
14854        Self::arbitrary(&mut unstructured).unwrap_or_default()
14855    }
14856}
14857impl Default for HIGH_LATENCY2_DATA {
14858    fn default() -> Self {
14859        Self::DEFAULT.clone()
14860    }
14861}
14862impl MessageData for HIGH_LATENCY2_DATA {
14863    type Message = MavMessage;
14864    const ID: u32 = 235u32;
14865    const NAME: &'static str = "HIGH_LATENCY2";
14866    const EXTRA_CRC: u8 = 179u8;
14867    const ENCODED_LEN: usize = 42usize;
14868    fn deser(
14869        _version: MavlinkVersion,
14870        __input: &[u8],
14871    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14872        let avail_len = __input.len();
14873        let mut payload_buf = [0; Self::ENCODED_LEN];
14874        let mut buf = if avail_len < Self::ENCODED_LEN {
14875            payload_buf[0..avail_len].copy_from_slice(__input);
14876            Bytes::new(&payload_buf)
14877        } else {
14878            Bytes::new(__input)
14879        };
14880        let mut __struct = Self::default();
14881        __struct.timestamp = buf.get_u32_le();
14882        __struct.latitude = buf.get_i32_le();
14883        __struct.longitude = buf.get_i32_le();
14884        __struct.custom_mode = buf.get_u16_le();
14885        __struct.altitude = buf.get_i16_le();
14886        __struct.target_altitude = buf.get_i16_le();
14887        __struct.target_distance = buf.get_u16_le();
14888        __struct.wp_num = buf.get_u16_le();
14889        let tmp = buf.get_u16_le();
14890        __struct.failure_flags = HlFailureFlag::from_bits(tmp & HlFailureFlag::all().bits())
14891            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14892                flag_type: "HlFailureFlag",
14893                value: tmp as u32,
14894            })?;
14895        let tmp = buf.get_u8();
14896        __struct.mavtype =
14897            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14898                enum_type: "MavType",
14899                value: tmp as u32,
14900            })?;
14901        let tmp = buf.get_u8();
14902        __struct.autopilot =
14903            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14904                enum_type: "MavAutopilot",
14905                value: tmp as u32,
14906            })?;
14907        __struct.heading = buf.get_u8();
14908        __struct.target_heading = buf.get_u8();
14909        __struct.throttle = buf.get_u8();
14910        __struct.airspeed = buf.get_u8();
14911        __struct.airspeed_sp = buf.get_u8();
14912        __struct.groundspeed = buf.get_u8();
14913        __struct.windspeed = buf.get_u8();
14914        __struct.wind_heading = buf.get_u8();
14915        __struct.eph = buf.get_u8();
14916        __struct.epv = buf.get_u8();
14917        __struct.temperature_air = buf.get_i8();
14918        __struct.climb_rate = buf.get_i8();
14919        __struct.battery = buf.get_i8();
14920        __struct.custom0 = buf.get_i8();
14921        __struct.custom1 = buf.get_i8();
14922        __struct.custom2 = buf.get_i8();
14923        Ok(__struct)
14924    }
14925    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14926        let mut __tmp = BytesMut::new(bytes);
14927        #[allow(clippy::absurd_extreme_comparisons)]
14928        #[allow(unused_comparisons)]
14929        if __tmp.remaining() < Self::ENCODED_LEN {
14930            panic!(
14931                "buffer is too small (need {} bytes, but got {})",
14932                Self::ENCODED_LEN,
14933                __tmp.remaining(),
14934            )
14935        }
14936        __tmp.put_u32_le(self.timestamp);
14937        __tmp.put_i32_le(self.latitude);
14938        __tmp.put_i32_le(self.longitude);
14939        __tmp.put_u16_le(self.custom_mode);
14940        __tmp.put_i16_le(self.altitude);
14941        __tmp.put_i16_le(self.target_altitude);
14942        __tmp.put_u16_le(self.target_distance);
14943        __tmp.put_u16_le(self.wp_num);
14944        __tmp.put_u16_le(self.failure_flags.bits());
14945        __tmp.put_u8(self.mavtype as u8);
14946        __tmp.put_u8(self.autopilot as u8);
14947        __tmp.put_u8(self.heading);
14948        __tmp.put_u8(self.target_heading);
14949        __tmp.put_u8(self.throttle);
14950        __tmp.put_u8(self.airspeed);
14951        __tmp.put_u8(self.airspeed_sp);
14952        __tmp.put_u8(self.groundspeed);
14953        __tmp.put_u8(self.windspeed);
14954        __tmp.put_u8(self.wind_heading);
14955        __tmp.put_u8(self.eph);
14956        __tmp.put_u8(self.epv);
14957        __tmp.put_i8(self.temperature_air);
14958        __tmp.put_i8(self.climb_rate);
14959        __tmp.put_i8(self.battery);
14960        __tmp.put_i8(self.custom0);
14961        __tmp.put_i8(self.custom1);
14962        __tmp.put_i8(self.custom2);
14963        if matches!(version, MavlinkVersion::V2) {
14964            let len = __tmp.len();
14965            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14966        } else {
14967            __tmp.len()
14968        }
14969    }
14970}
14971#[doc = "id: 93"]
14972#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
14973#[derive(Debug, Clone, PartialEq)]
14974#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14975#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14976pub struct HIL_ACTUATOR_CONTROLS_DATA {
14977    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14978    pub time_usec: u64,
14979    #[doc = "Flags bitmask."]
14980    pub flags: HilActuatorControlsFlags,
14981    #[doc = "Control outputs -1 .. 1. Channel assignment depends on the simulated hardware."]
14982    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14983    pub controls: [f32; 16],
14984    #[doc = "System mode. Includes arming state."]
14985    pub mode: MavModeFlag,
14986}
14987impl HIL_ACTUATOR_CONTROLS_DATA {
14988    pub const ENCODED_LEN: usize = 81usize;
14989    pub const DEFAULT: Self = Self {
14990        time_usec: 0_u64,
14991        flags: HilActuatorControlsFlags::DEFAULT,
14992        controls: [0.0_f32; 16usize],
14993        mode: MavModeFlag::DEFAULT,
14994    };
14995    #[cfg(feature = "arbitrary")]
14996    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14997        use arbitrary::{Arbitrary, Unstructured};
14998        let mut buf = [0u8; 1024];
14999        rng.fill_bytes(&mut buf);
15000        let mut unstructured = Unstructured::new(&buf);
15001        Self::arbitrary(&mut unstructured).unwrap_or_default()
15002    }
15003}
15004impl Default for HIL_ACTUATOR_CONTROLS_DATA {
15005    fn default() -> Self {
15006        Self::DEFAULT.clone()
15007    }
15008}
15009impl MessageData for HIL_ACTUATOR_CONTROLS_DATA {
15010    type Message = MavMessage;
15011    const ID: u32 = 93u32;
15012    const NAME: &'static str = "HIL_ACTUATOR_CONTROLS";
15013    const EXTRA_CRC: u8 = 47u8;
15014    const ENCODED_LEN: usize = 81usize;
15015    fn deser(
15016        _version: MavlinkVersion,
15017        __input: &[u8],
15018    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15019        let avail_len = __input.len();
15020        let mut payload_buf = [0; Self::ENCODED_LEN];
15021        let mut buf = if avail_len < Self::ENCODED_LEN {
15022            payload_buf[0..avail_len].copy_from_slice(__input);
15023            Bytes::new(&payload_buf)
15024        } else {
15025            Bytes::new(__input)
15026        };
15027        let mut __struct = Self::default();
15028        __struct.time_usec = buf.get_u64_le();
15029        let tmp = buf.get_u64_le();
15030        __struct.flags =
15031            HilActuatorControlsFlags::from_bits(tmp & HilActuatorControlsFlags::all().bits())
15032                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15033                    flag_type: "HilActuatorControlsFlags",
15034                    value: tmp as u32,
15035                })?;
15036        for v in &mut __struct.controls {
15037            let val = buf.get_f32_le();
15038            *v = val;
15039        }
15040        let tmp = buf.get_u8();
15041        __struct.mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
15042            ::mavlink_core::error::ParserError::InvalidFlag {
15043                flag_type: "MavModeFlag",
15044                value: tmp as u32,
15045            },
15046        )?;
15047        Ok(__struct)
15048    }
15049    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15050        let mut __tmp = BytesMut::new(bytes);
15051        #[allow(clippy::absurd_extreme_comparisons)]
15052        #[allow(unused_comparisons)]
15053        if __tmp.remaining() < Self::ENCODED_LEN {
15054            panic!(
15055                "buffer is too small (need {} bytes, but got {})",
15056                Self::ENCODED_LEN,
15057                __tmp.remaining(),
15058            )
15059        }
15060        __tmp.put_u64_le(self.time_usec);
15061        __tmp.put_u64_le(self.flags.bits());
15062        for val in &self.controls {
15063            __tmp.put_f32_le(*val);
15064        }
15065        __tmp.put_u8(self.mode.bits());
15066        if matches!(version, MavlinkVersion::V2) {
15067            let len = __tmp.len();
15068            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15069        } else {
15070            __tmp.len()
15071        }
15072    }
15073}
15074#[doc = "id: 91"]
15075#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
15076#[derive(Debug, Clone, PartialEq)]
15077#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15078#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15079pub struct HIL_CONTROLS_DATA {
15080    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15081    pub time_usec: u64,
15082    #[doc = "Control output -1 .. 1"]
15083    pub roll_ailerons: f32,
15084    #[doc = "Control output -1 .. 1"]
15085    pub pitch_elevator: f32,
15086    #[doc = "Control output -1 .. 1"]
15087    pub yaw_rudder: f32,
15088    #[doc = "Throttle 0 .. 1"]
15089    pub throttle: f32,
15090    #[doc = "Aux 1, -1 .. 1"]
15091    pub aux1: f32,
15092    #[doc = "Aux 2, -1 .. 1"]
15093    pub aux2: f32,
15094    #[doc = "Aux 3, -1 .. 1"]
15095    pub aux3: f32,
15096    #[doc = "Aux 4, -1 .. 1"]
15097    pub aux4: f32,
15098    #[doc = "System mode."]
15099    pub mode: MavMode,
15100    #[doc = "Navigation mode (MAV_NAV_MODE)"]
15101    pub nav_mode: u8,
15102}
15103impl HIL_CONTROLS_DATA {
15104    pub const ENCODED_LEN: usize = 42usize;
15105    pub const DEFAULT: Self = Self {
15106        time_usec: 0_u64,
15107        roll_ailerons: 0.0_f32,
15108        pitch_elevator: 0.0_f32,
15109        yaw_rudder: 0.0_f32,
15110        throttle: 0.0_f32,
15111        aux1: 0.0_f32,
15112        aux2: 0.0_f32,
15113        aux3: 0.0_f32,
15114        aux4: 0.0_f32,
15115        mode: MavMode::DEFAULT,
15116        nav_mode: 0_u8,
15117    };
15118    #[cfg(feature = "arbitrary")]
15119    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15120        use arbitrary::{Arbitrary, Unstructured};
15121        let mut buf = [0u8; 1024];
15122        rng.fill_bytes(&mut buf);
15123        let mut unstructured = Unstructured::new(&buf);
15124        Self::arbitrary(&mut unstructured).unwrap_or_default()
15125    }
15126}
15127impl Default for HIL_CONTROLS_DATA {
15128    fn default() -> Self {
15129        Self::DEFAULT.clone()
15130    }
15131}
15132impl MessageData for HIL_CONTROLS_DATA {
15133    type Message = MavMessage;
15134    const ID: u32 = 91u32;
15135    const NAME: &'static str = "HIL_CONTROLS";
15136    const EXTRA_CRC: u8 = 63u8;
15137    const ENCODED_LEN: usize = 42usize;
15138    fn deser(
15139        _version: MavlinkVersion,
15140        __input: &[u8],
15141    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15142        let avail_len = __input.len();
15143        let mut payload_buf = [0; Self::ENCODED_LEN];
15144        let mut buf = if avail_len < Self::ENCODED_LEN {
15145            payload_buf[0..avail_len].copy_from_slice(__input);
15146            Bytes::new(&payload_buf)
15147        } else {
15148            Bytes::new(__input)
15149        };
15150        let mut __struct = Self::default();
15151        __struct.time_usec = buf.get_u64_le();
15152        __struct.roll_ailerons = buf.get_f32_le();
15153        __struct.pitch_elevator = buf.get_f32_le();
15154        __struct.yaw_rudder = buf.get_f32_le();
15155        __struct.throttle = buf.get_f32_le();
15156        __struct.aux1 = buf.get_f32_le();
15157        __struct.aux2 = buf.get_f32_le();
15158        __struct.aux3 = buf.get_f32_le();
15159        __struct.aux4 = buf.get_f32_le();
15160        let tmp = buf.get_u8();
15161        __struct.mode =
15162            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15163                enum_type: "MavMode",
15164                value: tmp as u32,
15165            })?;
15166        __struct.nav_mode = buf.get_u8();
15167        Ok(__struct)
15168    }
15169    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15170        let mut __tmp = BytesMut::new(bytes);
15171        #[allow(clippy::absurd_extreme_comparisons)]
15172        #[allow(unused_comparisons)]
15173        if __tmp.remaining() < Self::ENCODED_LEN {
15174            panic!(
15175                "buffer is too small (need {} bytes, but got {})",
15176                Self::ENCODED_LEN,
15177                __tmp.remaining(),
15178            )
15179        }
15180        __tmp.put_u64_le(self.time_usec);
15181        __tmp.put_f32_le(self.roll_ailerons);
15182        __tmp.put_f32_le(self.pitch_elevator);
15183        __tmp.put_f32_le(self.yaw_rudder);
15184        __tmp.put_f32_le(self.throttle);
15185        __tmp.put_f32_le(self.aux1);
15186        __tmp.put_f32_le(self.aux2);
15187        __tmp.put_f32_le(self.aux3);
15188        __tmp.put_f32_le(self.aux4);
15189        __tmp.put_u8(self.mode as u8);
15190        __tmp.put_u8(self.nav_mode);
15191        if matches!(version, MavlinkVersion::V2) {
15192            let len = __tmp.len();
15193            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15194        } else {
15195            __tmp.len()
15196        }
15197    }
15198}
15199#[doc = "id: 113"]
15200#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
15201#[derive(Debug, Clone, PartialEq)]
15202#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15203#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15204pub struct HIL_GPS_DATA {
15205    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15206    pub time_usec: u64,
15207    #[doc = "Latitude (WGS84)"]
15208    pub lat: i32,
15209    #[doc = "Longitude (WGS84)"]
15210    pub lon: i32,
15211    #[doc = "Altitude (MSL). Positive for up."]
15212    pub alt: i32,
15213    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15214    pub eph: u16,
15215    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15216    pub epv: u16,
15217    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
15218    pub vel: u16,
15219    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
15220    pub vn: i16,
15221    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
15222    pub ve: i16,
15223    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
15224    pub vd: i16,
15225    #[doc = "Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
15226    pub cog: u16,
15227    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix."]
15228    pub fix_type: u8,
15229    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
15230    pub satellites_visible: u8,
15231    #[doc = "GPS ID (zero indexed). Used for multiple GPS inputs"]
15232    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15233    pub id: u8,
15234    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
15235    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15236    pub yaw: u16,
15237}
15238impl HIL_GPS_DATA {
15239    pub const ENCODED_LEN: usize = 39usize;
15240    pub const DEFAULT: Self = Self {
15241        time_usec: 0_u64,
15242        lat: 0_i32,
15243        lon: 0_i32,
15244        alt: 0_i32,
15245        eph: 0_u16,
15246        epv: 0_u16,
15247        vel: 0_u16,
15248        vn: 0_i16,
15249        ve: 0_i16,
15250        vd: 0_i16,
15251        cog: 0_u16,
15252        fix_type: 0_u8,
15253        satellites_visible: 0_u8,
15254        id: 0_u8,
15255        yaw: 0_u16,
15256    };
15257    #[cfg(feature = "arbitrary")]
15258    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15259        use arbitrary::{Arbitrary, Unstructured};
15260        let mut buf = [0u8; 1024];
15261        rng.fill_bytes(&mut buf);
15262        let mut unstructured = Unstructured::new(&buf);
15263        Self::arbitrary(&mut unstructured).unwrap_or_default()
15264    }
15265}
15266impl Default for HIL_GPS_DATA {
15267    fn default() -> Self {
15268        Self::DEFAULT.clone()
15269    }
15270}
15271impl MessageData for HIL_GPS_DATA {
15272    type Message = MavMessage;
15273    const ID: u32 = 113u32;
15274    const NAME: &'static str = "HIL_GPS";
15275    const EXTRA_CRC: u8 = 124u8;
15276    const ENCODED_LEN: usize = 39usize;
15277    fn deser(
15278        _version: MavlinkVersion,
15279        __input: &[u8],
15280    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15281        let avail_len = __input.len();
15282        let mut payload_buf = [0; Self::ENCODED_LEN];
15283        let mut buf = if avail_len < Self::ENCODED_LEN {
15284            payload_buf[0..avail_len].copy_from_slice(__input);
15285            Bytes::new(&payload_buf)
15286        } else {
15287            Bytes::new(__input)
15288        };
15289        let mut __struct = Self::default();
15290        __struct.time_usec = buf.get_u64_le();
15291        __struct.lat = buf.get_i32_le();
15292        __struct.lon = buf.get_i32_le();
15293        __struct.alt = buf.get_i32_le();
15294        __struct.eph = buf.get_u16_le();
15295        __struct.epv = buf.get_u16_le();
15296        __struct.vel = buf.get_u16_le();
15297        __struct.vn = buf.get_i16_le();
15298        __struct.ve = buf.get_i16_le();
15299        __struct.vd = buf.get_i16_le();
15300        __struct.cog = buf.get_u16_le();
15301        __struct.fix_type = buf.get_u8();
15302        __struct.satellites_visible = buf.get_u8();
15303        __struct.id = buf.get_u8();
15304        __struct.yaw = buf.get_u16_le();
15305        Ok(__struct)
15306    }
15307    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15308        let mut __tmp = BytesMut::new(bytes);
15309        #[allow(clippy::absurd_extreme_comparisons)]
15310        #[allow(unused_comparisons)]
15311        if __tmp.remaining() < Self::ENCODED_LEN {
15312            panic!(
15313                "buffer is too small (need {} bytes, but got {})",
15314                Self::ENCODED_LEN,
15315                __tmp.remaining(),
15316            )
15317        }
15318        __tmp.put_u64_le(self.time_usec);
15319        __tmp.put_i32_le(self.lat);
15320        __tmp.put_i32_le(self.lon);
15321        __tmp.put_i32_le(self.alt);
15322        __tmp.put_u16_le(self.eph);
15323        __tmp.put_u16_le(self.epv);
15324        __tmp.put_u16_le(self.vel);
15325        __tmp.put_i16_le(self.vn);
15326        __tmp.put_i16_le(self.ve);
15327        __tmp.put_i16_le(self.vd);
15328        __tmp.put_u16_le(self.cog);
15329        __tmp.put_u8(self.fix_type);
15330        __tmp.put_u8(self.satellites_visible);
15331        __tmp.put_u8(self.id);
15332        __tmp.put_u16_le(self.yaw);
15333        if matches!(version, MavlinkVersion::V2) {
15334            let len = __tmp.len();
15335            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15336        } else {
15337            __tmp.len()
15338        }
15339    }
15340}
15341#[doc = "id: 114"]
15342#[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
15343#[derive(Debug, Clone, PartialEq)]
15344#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15345#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15346pub struct HIL_OPTICAL_FLOW_DATA {
15347    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15348    pub time_usec: u64,
15349    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
15350    pub integration_time_us: u32,
15351    #[doc = "Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
15352    pub integrated_x: f32,
15353    #[doc = "Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
15354    pub integrated_y: f32,
15355    #[doc = "RH rotation around X axis"]
15356    pub integrated_xgyro: f32,
15357    #[doc = "RH rotation around Y axis"]
15358    pub integrated_ygyro: f32,
15359    #[doc = "RH rotation around Z axis"]
15360    pub integrated_zgyro: f32,
15361    #[doc = "Time since the distance was sampled."]
15362    pub time_delta_distance_us: u32,
15363    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
15364    pub distance: f32,
15365    #[doc = "Temperature"]
15366    pub temperature: i16,
15367    #[doc = "Sensor ID"]
15368    pub sensor_id: u8,
15369    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
15370    pub quality: u8,
15371}
15372impl HIL_OPTICAL_FLOW_DATA {
15373    pub const ENCODED_LEN: usize = 44usize;
15374    pub const DEFAULT: Self = Self {
15375        time_usec: 0_u64,
15376        integration_time_us: 0_u32,
15377        integrated_x: 0.0_f32,
15378        integrated_y: 0.0_f32,
15379        integrated_xgyro: 0.0_f32,
15380        integrated_ygyro: 0.0_f32,
15381        integrated_zgyro: 0.0_f32,
15382        time_delta_distance_us: 0_u32,
15383        distance: 0.0_f32,
15384        temperature: 0_i16,
15385        sensor_id: 0_u8,
15386        quality: 0_u8,
15387    };
15388    #[cfg(feature = "arbitrary")]
15389    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15390        use arbitrary::{Arbitrary, Unstructured};
15391        let mut buf = [0u8; 1024];
15392        rng.fill_bytes(&mut buf);
15393        let mut unstructured = Unstructured::new(&buf);
15394        Self::arbitrary(&mut unstructured).unwrap_or_default()
15395    }
15396}
15397impl Default for HIL_OPTICAL_FLOW_DATA {
15398    fn default() -> Self {
15399        Self::DEFAULT.clone()
15400    }
15401}
15402impl MessageData for HIL_OPTICAL_FLOW_DATA {
15403    type Message = MavMessage;
15404    const ID: u32 = 114u32;
15405    const NAME: &'static str = "HIL_OPTICAL_FLOW";
15406    const EXTRA_CRC: u8 = 237u8;
15407    const ENCODED_LEN: usize = 44usize;
15408    fn deser(
15409        _version: MavlinkVersion,
15410        __input: &[u8],
15411    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15412        let avail_len = __input.len();
15413        let mut payload_buf = [0; Self::ENCODED_LEN];
15414        let mut buf = if avail_len < Self::ENCODED_LEN {
15415            payload_buf[0..avail_len].copy_from_slice(__input);
15416            Bytes::new(&payload_buf)
15417        } else {
15418            Bytes::new(__input)
15419        };
15420        let mut __struct = Self::default();
15421        __struct.time_usec = buf.get_u64_le();
15422        __struct.integration_time_us = buf.get_u32_le();
15423        __struct.integrated_x = buf.get_f32_le();
15424        __struct.integrated_y = buf.get_f32_le();
15425        __struct.integrated_xgyro = buf.get_f32_le();
15426        __struct.integrated_ygyro = buf.get_f32_le();
15427        __struct.integrated_zgyro = buf.get_f32_le();
15428        __struct.time_delta_distance_us = buf.get_u32_le();
15429        __struct.distance = buf.get_f32_le();
15430        __struct.temperature = buf.get_i16_le();
15431        __struct.sensor_id = buf.get_u8();
15432        __struct.quality = buf.get_u8();
15433        Ok(__struct)
15434    }
15435    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15436        let mut __tmp = BytesMut::new(bytes);
15437        #[allow(clippy::absurd_extreme_comparisons)]
15438        #[allow(unused_comparisons)]
15439        if __tmp.remaining() < Self::ENCODED_LEN {
15440            panic!(
15441                "buffer is too small (need {} bytes, but got {})",
15442                Self::ENCODED_LEN,
15443                __tmp.remaining(),
15444            )
15445        }
15446        __tmp.put_u64_le(self.time_usec);
15447        __tmp.put_u32_le(self.integration_time_us);
15448        __tmp.put_f32_le(self.integrated_x);
15449        __tmp.put_f32_le(self.integrated_y);
15450        __tmp.put_f32_le(self.integrated_xgyro);
15451        __tmp.put_f32_le(self.integrated_ygyro);
15452        __tmp.put_f32_le(self.integrated_zgyro);
15453        __tmp.put_u32_le(self.time_delta_distance_us);
15454        __tmp.put_f32_le(self.distance);
15455        __tmp.put_i16_le(self.temperature);
15456        __tmp.put_u8(self.sensor_id);
15457        __tmp.put_u8(self.quality);
15458        if matches!(version, MavlinkVersion::V2) {
15459            let len = __tmp.len();
15460            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15461        } else {
15462            __tmp.len()
15463        }
15464    }
15465}
15466#[doc = "id: 92"]
15467#[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
15468#[derive(Debug, Clone, PartialEq)]
15469#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15470#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15471pub struct HIL_RC_INPUTS_RAW_DATA {
15472    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15473    pub time_usec: u64,
15474    #[doc = "RC channel 1 value"]
15475    pub chan1_raw: u16,
15476    #[doc = "RC channel 2 value"]
15477    pub chan2_raw: u16,
15478    #[doc = "RC channel 3 value"]
15479    pub chan3_raw: u16,
15480    #[doc = "RC channel 4 value"]
15481    pub chan4_raw: u16,
15482    #[doc = "RC channel 5 value"]
15483    pub chan5_raw: u16,
15484    #[doc = "RC channel 6 value"]
15485    pub chan6_raw: u16,
15486    #[doc = "RC channel 7 value"]
15487    pub chan7_raw: u16,
15488    #[doc = "RC channel 8 value"]
15489    pub chan8_raw: u16,
15490    #[doc = "RC channel 9 value"]
15491    pub chan9_raw: u16,
15492    #[doc = "RC channel 10 value"]
15493    pub chan10_raw: u16,
15494    #[doc = "RC channel 11 value"]
15495    pub chan11_raw: u16,
15496    #[doc = "RC channel 12 value"]
15497    pub chan12_raw: u16,
15498    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
15499    pub rssi: u8,
15500}
15501impl HIL_RC_INPUTS_RAW_DATA {
15502    pub const ENCODED_LEN: usize = 33usize;
15503    pub const DEFAULT: Self = Self {
15504        time_usec: 0_u64,
15505        chan1_raw: 0_u16,
15506        chan2_raw: 0_u16,
15507        chan3_raw: 0_u16,
15508        chan4_raw: 0_u16,
15509        chan5_raw: 0_u16,
15510        chan6_raw: 0_u16,
15511        chan7_raw: 0_u16,
15512        chan8_raw: 0_u16,
15513        chan9_raw: 0_u16,
15514        chan10_raw: 0_u16,
15515        chan11_raw: 0_u16,
15516        chan12_raw: 0_u16,
15517        rssi: 0_u8,
15518    };
15519    #[cfg(feature = "arbitrary")]
15520    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15521        use arbitrary::{Arbitrary, Unstructured};
15522        let mut buf = [0u8; 1024];
15523        rng.fill_bytes(&mut buf);
15524        let mut unstructured = Unstructured::new(&buf);
15525        Self::arbitrary(&mut unstructured).unwrap_or_default()
15526    }
15527}
15528impl Default for HIL_RC_INPUTS_RAW_DATA {
15529    fn default() -> Self {
15530        Self::DEFAULT.clone()
15531    }
15532}
15533impl MessageData for HIL_RC_INPUTS_RAW_DATA {
15534    type Message = MavMessage;
15535    const ID: u32 = 92u32;
15536    const NAME: &'static str = "HIL_RC_INPUTS_RAW";
15537    const EXTRA_CRC: u8 = 54u8;
15538    const ENCODED_LEN: usize = 33usize;
15539    fn deser(
15540        _version: MavlinkVersion,
15541        __input: &[u8],
15542    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15543        let avail_len = __input.len();
15544        let mut payload_buf = [0; Self::ENCODED_LEN];
15545        let mut buf = if avail_len < Self::ENCODED_LEN {
15546            payload_buf[0..avail_len].copy_from_slice(__input);
15547            Bytes::new(&payload_buf)
15548        } else {
15549            Bytes::new(__input)
15550        };
15551        let mut __struct = Self::default();
15552        __struct.time_usec = buf.get_u64_le();
15553        __struct.chan1_raw = buf.get_u16_le();
15554        __struct.chan2_raw = buf.get_u16_le();
15555        __struct.chan3_raw = buf.get_u16_le();
15556        __struct.chan4_raw = buf.get_u16_le();
15557        __struct.chan5_raw = buf.get_u16_le();
15558        __struct.chan6_raw = buf.get_u16_le();
15559        __struct.chan7_raw = buf.get_u16_le();
15560        __struct.chan8_raw = buf.get_u16_le();
15561        __struct.chan9_raw = buf.get_u16_le();
15562        __struct.chan10_raw = buf.get_u16_le();
15563        __struct.chan11_raw = buf.get_u16_le();
15564        __struct.chan12_raw = buf.get_u16_le();
15565        __struct.rssi = buf.get_u8();
15566        Ok(__struct)
15567    }
15568    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15569        let mut __tmp = BytesMut::new(bytes);
15570        #[allow(clippy::absurd_extreme_comparisons)]
15571        #[allow(unused_comparisons)]
15572        if __tmp.remaining() < Self::ENCODED_LEN {
15573            panic!(
15574                "buffer is too small (need {} bytes, but got {})",
15575                Self::ENCODED_LEN,
15576                __tmp.remaining(),
15577            )
15578        }
15579        __tmp.put_u64_le(self.time_usec);
15580        __tmp.put_u16_le(self.chan1_raw);
15581        __tmp.put_u16_le(self.chan2_raw);
15582        __tmp.put_u16_le(self.chan3_raw);
15583        __tmp.put_u16_le(self.chan4_raw);
15584        __tmp.put_u16_le(self.chan5_raw);
15585        __tmp.put_u16_le(self.chan6_raw);
15586        __tmp.put_u16_le(self.chan7_raw);
15587        __tmp.put_u16_le(self.chan8_raw);
15588        __tmp.put_u16_le(self.chan9_raw);
15589        __tmp.put_u16_le(self.chan10_raw);
15590        __tmp.put_u16_le(self.chan11_raw);
15591        __tmp.put_u16_le(self.chan12_raw);
15592        __tmp.put_u8(self.rssi);
15593        if matches!(version, MavlinkVersion::V2) {
15594            let len = __tmp.len();
15595            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15596        } else {
15597            __tmp.len()
15598        }
15599    }
15600}
15601#[doc = "id: 107"]
15602#[doc = "The IMU readings in SI units in NED body frame."]
15603#[derive(Debug, Clone, PartialEq)]
15604#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15605#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15606pub struct HIL_SENSOR_DATA {
15607    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15608    pub time_usec: u64,
15609    #[doc = "X acceleration"]
15610    pub xacc: f32,
15611    #[doc = "Y acceleration"]
15612    pub yacc: f32,
15613    #[doc = "Z acceleration"]
15614    pub zacc: f32,
15615    #[doc = "Angular speed around X axis in body frame"]
15616    pub xgyro: f32,
15617    #[doc = "Angular speed around Y axis in body frame"]
15618    pub ygyro: f32,
15619    #[doc = "Angular speed around Z axis in body frame"]
15620    pub zgyro: f32,
15621    #[doc = "X Magnetic field"]
15622    pub xmag: f32,
15623    #[doc = "Y Magnetic field"]
15624    pub ymag: f32,
15625    #[doc = "Z Magnetic field"]
15626    pub zmag: f32,
15627    #[doc = "Absolute pressure"]
15628    pub abs_pressure: f32,
15629    #[doc = "Differential pressure (airspeed)"]
15630    pub diff_pressure: f32,
15631    #[doc = "Altitude calculated from pressure"]
15632    pub pressure_alt: f32,
15633    #[doc = "Temperature"]
15634    pub temperature: f32,
15635    #[doc = "Bitmap for fields that have updated since last message"]
15636    pub fields_updated: HilSensorUpdatedFlags,
15637    #[doc = "Sensor ID (zero indexed). Used for multiple sensor inputs"]
15638    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15639    pub id: u8,
15640}
15641impl HIL_SENSOR_DATA {
15642    pub const ENCODED_LEN: usize = 65usize;
15643    pub const DEFAULT: Self = Self {
15644        time_usec: 0_u64,
15645        xacc: 0.0_f32,
15646        yacc: 0.0_f32,
15647        zacc: 0.0_f32,
15648        xgyro: 0.0_f32,
15649        ygyro: 0.0_f32,
15650        zgyro: 0.0_f32,
15651        xmag: 0.0_f32,
15652        ymag: 0.0_f32,
15653        zmag: 0.0_f32,
15654        abs_pressure: 0.0_f32,
15655        diff_pressure: 0.0_f32,
15656        pressure_alt: 0.0_f32,
15657        temperature: 0.0_f32,
15658        fields_updated: HilSensorUpdatedFlags::DEFAULT,
15659        id: 0_u8,
15660    };
15661    #[cfg(feature = "arbitrary")]
15662    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15663        use arbitrary::{Arbitrary, Unstructured};
15664        let mut buf = [0u8; 1024];
15665        rng.fill_bytes(&mut buf);
15666        let mut unstructured = Unstructured::new(&buf);
15667        Self::arbitrary(&mut unstructured).unwrap_or_default()
15668    }
15669}
15670impl Default for HIL_SENSOR_DATA {
15671    fn default() -> Self {
15672        Self::DEFAULT.clone()
15673    }
15674}
15675impl MessageData for HIL_SENSOR_DATA {
15676    type Message = MavMessage;
15677    const ID: u32 = 107u32;
15678    const NAME: &'static str = "HIL_SENSOR";
15679    const EXTRA_CRC: u8 = 108u8;
15680    const ENCODED_LEN: usize = 65usize;
15681    fn deser(
15682        _version: MavlinkVersion,
15683        __input: &[u8],
15684    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15685        let avail_len = __input.len();
15686        let mut payload_buf = [0; Self::ENCODED_LEN];
15687        let mut buf = if avail_len < Self::ENCODED_LEN {
15688            payload_buf[0..avail_len].copy_from_slice(__input);
15689            Bytes::new(&payload_buf)
15690        } else {
15691            Bytes::new(__input)
15692        };
15693        let mut __struct = Self::default();
15694        __struct.time_usec = buf.get_u64_le();
15695        __struct.xacc = buf.get_f32_le();
15696        __struct.yacc = buf.get_f32_le();
15697        __struct.zacc = buf.get_f32_le();
15698        __struct.xgyro = buf.get_f32_le();
15699        __struct.ygyro = buf.get_f32_le();
15700        __struct.zgyro = buf.get_f32_le();
15701        __struct.xmag = buf.get_f32_le();
15702        __struct.ymag = buf.get_f32_le();
15703        __struct.zmag = buf.get_f32_le();
15704        __struct.abs_pressure = buf.get_f32_le();
15705        __struct.diff_pressure = buf.get_f32_le();
15706        __struct.pressure_alt = buf.get_f32_le();
15707        __struct.temperature = buf.get_f32_le();
15708        let tmp = buf.get_u32_le();
15709        __struct.fields_updated = HilSensorUpdatedFlags::from_bits(
15710            tmp & HilSensorUpdatedFlags::all().bits(),
15711        )
15712        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15713            flag_type: "HilSensorUpdatedFlags",
15714            value: tmp as u32,
15715        })?;
15716        __struct.id = buf.get_u8();
15717        Ok(__struct)
15718    }
15719    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15720        let mut __tmp = BytesMut::new(bytes);
15721        #[allow(clippy::absurd_extreme_comparisons)]
15722        #[allow(unused_comparisons)]
15723        if __tmp.remaining() < Self::ENCODED_LEN {
15724            panic!(
15725                "buffer is too small (need {} bytes, but got {})",
15726                Self::ENCODED_LEN,
15727                __tmp.remaining(),
15728            )
15729        }
15730        __tmp.put_u64_le(self.time_usec);
15731        __tmp.put_f32_le(self.xacc);
15732        __tmp.put_f32_le(self.yacc);
15733        __tmp.put_f32_le(self.zacc);
15734        __tmp.put_f32_le(self.xgyro);
15735        __tmp.put_f32_le(self.ygyro);
15736        __tmp.put_f32_le(self.zgyro);
15737        __tmp.put_f32_le(self.xmag);
15738        __tmp.put_f32_le(self.ymag);
15739        __tmp.put_f32_le(self.zmag);
15740        __tmp.put_f32_le(self.abs_pressure);
15741        __tmp.put_f32_le(self.diff_pressure);
15742        __tmp.put_f32_le(self.pressure_alt);
15743        __tmp.put_f32_le(self.temperature);
15744        __tmp.put_u32_le(self.fields_updated.bits());
15745        __tmp.put_u8(self.id);
15746        if matches!(version, MavlinkVersion::V2) {
15747            let len = __tmp.len();
15748            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15749        } else {
15750            __tmp.len()
15751        }
15752    }
15753}
15754#[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
15755#[doc = "id: 90"]
15756#[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
15757#[derive(Debug, Clone, PartialEq)]
15758#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15759#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15760pub struct HIL_STATE_DATA {
15761    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15762    pub time_usec: u64,
15763    #[doc = "Roll angle"]
15764    pub roll: f32,
15765    #[doc = "Pitch angle"]
15766    pub pitch: f32,
15767    #[doc = "Yaw angle"]
15768    pub yaw: f32,
15769    #[doc = "Body frame roll / phi angular speed"]
15770    pub rollspeed: f32,
15771    #[doc = "Body frame pitch / theta angular speed"]
15772    pub pitchspeed: f32,
15773    #[doc = "Body frame yaw / psi angular speed"]
15774    pub yawspeed: f32,
15775    #[doc = "Latitude"]
15776    pub lat: i32,
15777    #[doc = "Longitude"]
15778    pub lon: i32,
15779    #[doc = "Altitude"]
15780    pub alt: i32,
15781    #[doc = "Ground X Speed (Latitude)"]
15782    pub vx: i16,
15783    #[doc = "Ground Y Speed (Longitude)"]
15784    pub vy: i16,
15785    #[doc = "Ground Z Speed (Altitude)"]
15786    pub vz: i16,
15787    #[doc = "X acceleration"]
15788    pub xacc: i16,
15789    #[doc = "Y acceleration"]
15790    pub yacc: i16,
15791    #[doc = "Z acceleration"]
15792    pub zacc: i16,
15793}
15794impl HIL_STATE_DATA {
15795    pub const ENCODED_LEN: usize = 56usize;
15796    pub const DEFAULT: Self = Self {
15797        time_usec: 0_u64,
15798        roll: 0.0_f32,
15799        pitch: 0.0_f32,
15800        yaw: 0.0_f32,
15801        rollspeed: 0.0_f32,
15802        pitchspeed: 0.0_f32,
15803        yawspeed: 0.0_f32,
15804        lat: 0_i32,
15805        lon: 0_i32,
15806        alt: 0_i32,
15807        vx: 0_i16,
15808        vy: 0_i16,
15809        vz: 0_i16,
15810        xacc: 0_i16,
15811        yacc: 0_i16,
15812        zacc: 0_i16,
15813    };
15814    #[cfg(feature = "arbitrary")]
15815    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15816        use arbitrary::{Arbitrary, Unstructured};
15817        let mut buf = [0u8; 1024];
15818        rng.fill_bytes(&mut buf);
15819        let mut unstructured = Unstructured::new(&buf);
15820        Self::arbitrary(&mut unstructured).unwrap_or_default()
15821    }
15822}
15823impl Default for HIL_STATE_DATA {
15824    fn default() -> Self {
15825        Self::DEFAULT.clone()
15826    }
15827}
15828impl MessageData for HIL_STATE_DATA {
15829    type Message = MavMessage;
15830    const ID: u32 = 90u32;
15831    const NAME: &'static str = "HIL_STATE";
15832    const EXTRA_CRC: u8 = 183u8;
15833    const ENCODED_LEN: usize = 56usize;
15834    fn deser(
15835        _version: MavlinkVersion,
15836        __input: &[u8],
15837    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15838        let avail_len = __input.len();
15839        let mut payload_buf = [0; Self::ENCODED_LEN];
15840        let mut buf = if avail_len < Self::ENCODED_LEN {
15841            payload_buf[0..avail_len].copy_from_slice(__input);
15842            Bytes::new(&payload_buf)
15843        } else {
15844            Bytes::new(__input)
15845        };
15846        let mut __struct = Self::default();
15847        __struct.time_usec = buf.get_u64_le();
15848        __struct.roll = buf.get_f32_le();
15849        __struct.pitch = buf.get_f32_le();
15850        __struct.yaw = buf.get_f32_le();
15851        __struct.rollspeed = buf.get_f32_le();
15852        __struct.pitchspeed = buf.get_f32_le();
15853        __struct.yawspeed = buf.get_f32_le();
15854        __struct.lat = buf.get_i32_le();
15855        __struct.lon = buf.get_i32_le();
15856        __struct.alt = buf.get_i32_le();
15857        __struct.vx = buf.get_i16_le();
15858        __struct.vy = buf.get_i16_le();
15859        __struct.vz = buf.get_i16_le();
15860        __struct.xacc = buf.get_i16_le();
15861        __struct.yacc = buf.get_i16_le();
15862        __struct.zacc = buf.get_i16_le();
15863        Ok(__struct)
15864    }
15865    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15866        let mut __tmp = BytesMut::new(bytes);
15867        #[allow(clippy::absurd_extreme_comparisons)]
15868        #[allow(unused_comparisons)]
15869        if __tmp.remaining() < Self::ENCODED_LEN {
15870            panic!(
15871                "buffer is too small (need {} bytes, but got {})",
15872                Self::ENCODED_LEN,
15873                __tmp.remaining(),
15874            )
15875        }
15876        __tmp.put_u64_le(self.time_usec);
15877        __tmp.put_f32_le(self.roll);
15878        __tmp.put_f32_le(self.pitch);
15879        __tmp.put_f32_le(self.yaw);
15880        __tmp.put_f32_le(self.rollspeed);
15881        __tmp.put_f32_le(self.pitchspeed);
15882        __tmp.put_f32_le(self.yawspeed);
15883        __tmp.put_i32_le(self.lat);
15884        __tmp.put_i32_le(self.lon);
15885        __tmp.put_i32_le(self.alt);
15886        __tmp.put_i16_le(self.vx);
15887        __tmp.put_i16_le(self.vy);
15888        __tmp.put_i16_le(self.vz);
15889        __tmp.put_i16_le(self.xacc);
15890        __tmp.put_i16_le(self.yacc);
15891        __tmp.put_i16_le(self.zacc);
15892        if matches!(version, MavlinkVersion::V2) {
15893            let len = __tmp.len();
15894            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15895        } else {
15896            __tmp.len()
15897        }
15898    }
15899}
15900#[doc = "id: 115"]
15901#[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
15902#[derive(Debug, Clone, PartialEq)]
15903#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15904#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15905pub struct HIL_STATE_QUATERNION_DATA {
15906    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15907    pub time_usec: u64,
15908    #[doc = "Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-rotation)"]
15909    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15910    pub attitude_quaternion: [f32; 4],
15911    #[doc = "Body frame roll / phi angular speed"]
15912    pub rollspeed: f32,
15913    #[doc = "Body frame pitch / theta angular speed"]
15914    pub pitchspeed: f32,
15915    #[doc = "Body frame yaw / psi angular speed"]
15916    pub yawspeed: f32,
15917    #[doc = "Latitude"]
15918    pub lat: i32,
15919    #[doc = "Longitude"]
15920    pub lon: i32,
15921    #[doc = "Altitude"]
15922    pub alt: i32,
15923    #[doc = "Ground X Speed (Latitude)"]
15924    pub vx: i16,
15925    #[doc = "Ground Y Speed (Longitude)"]
15926    pub vy: i16,
15927    #[doc = "Ground Z Speed (Altitude)"]
15928    pub vz: i16,
15929    #[doc = "Indicated airspeed"]
15930    pub ind_airspeed: u16,
15931    #[doc = "True airspeed"]
15932    pub true_airspeed: u16,
15933    #[doc = "X acceleration"]
15934    pub xacc: i16,
15935    #[doc = "Y acceleration"]
15936    pub yacc: i16,
15937    #[doc = "Z acceleration"]
15938    pub zacc: i16,
15939}
15940impl HIL_STATE_QUATERNION_DATA {
15941    pub const ENCODED_LEN: usize = 64usize;
15942    pub const DEFAULT: Self = Self {
15943        time_usec: 0_u64,
15944        attitude_quaternion: [0.0_f32; 4usize],
15945        rollspeed: 0.0_f32,
15946        pitchspeed: 0.0_f32,
15947        yawspeed: 0.0_f32,
15948        lat: 0_i32,
15949        lon: 0_i32,
15950        alt: 0_i32,
15951        vx: 0_i16,
15952        vy: 0_i16,
15953        vz: 0_i16,
15954        ind_airspeed: 0_u16,
15955        true_airspeed: 0_u16,
15956        xacc: 0_i16,
15957        yacc: 0_i16,
15958        zacc: 0_i16,
15959    };
15960    #[cfg(feature = "arbitrary")]
15961    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15962        use arbitrary::{Arbitrary, Unstructured};
15963        let mut buf = [0u8; 1024];
15964        rng.fill_bytes(&mut buf);
15965        let mut unstructured = Unstructured::new(&buf);
15966        Self::arbitrary(&mut unstructured).unwrap_or_default()
15967    }
15968}
15969impl Default for HIL_STATE_QUATERNION_DATA {
15970    fn default() -> Self {
15971        Self::DEFAULT.clone()
15972    }
15973}
15974impl MessageData for HIL_STATE_QUATERNION_DATA {
15975    type Message = MavMessage;
15976    const ID: u32 = 115u32;
15977    const NAME: &'static str = "HIL_STATE_QUATERNION";
15978    const EXTRA_CRC: u8 = 4u8;
15979    const ENCODED_LEN: usize = 64usize;
15980    fn deser(
15981        _version: MavlinkVersion,
15982        __input: &[u8],
15983    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15984        let avail_len = __input.len();
15985        let mut payload_buf = [0; Self::ENCODED_LEN];
15986        let mut buf = if avail_len < Self::ENCODED_LEN {
15987            payload_buf[0..avail_len].copy_from_slice(__input);
15988            Bytes::new(&payload_buf)
15989        } else {
15990            Bytes::new(__input)
15991        };
15992        let mut __struct = Self::default();
15993        __struct.time_usec = buf.get_u64_le();
15994        for v in &mut __struct.attitude_quaternion {
15995            let val = buf.get_f32_le();
15996            *v = val;
15997        }
15998        __struct.rollspeed = buf.get_f32_le();
15999        __struct.pitchspeed = buf.get_f32_le();
16000        __struct.yawspeed = buf.get_f32_le();
16001        __struct.lat = buf.get_i32_le();
16002        __struct.lon = buf.get_i32_le();
16003        __struct.alt = buf.get_i32_le();
16004        __struct.vx = buf.get_i16_le();
16005        __struct.vy = buf.get_i16_le();
16006        __struct.vz = buf.get_i16_le();
16007        __struct.ind_airspeed = buf.get_u16_le();
16008        __struct.true_airspeed = buf.get_u16_le();
16009        __struct.xacc = buf.get_i16_le();
16010        __struct.yacc = buf.get_i16_le();
16011        __struct.zacc = buf.get_i16_le();
16012        Ok(__struct)
16013    }
16014    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16015        let mut __tmp = BytesMut::new(bytes);
16016        #[allow(clippy::absurd_extreme_comparisons)]
16017        #[allow(unused_comparisons)]
16018        if __tmp.remaining() < Self::ENCODED_LEN {
16019            panic!(
16020                "buffer is too small (need {} bytes, but got {})",
16021                Self::ENCODED_LEN,
16022                __tmp.remaining(),
16023            )
16024        }
16025        __tmp.put_u64_le(self.time_usec);
16026        for val in &self.attitude_quaternion {
16027            __tmp.put_f32_le(*val);
16028        }
16029        __tmp.put_f32_le(self.rollspeed);
16030        __tmp.put_f32_le(self.pitchspeed);
16031        __tmp.put_f32_le(self.yawspeed);
16032        __tmp.put_i32_le(self.lat);
16033        __tmp.put_i32_le(self.lon);
16034        __tmp.put_i32_le(self.alt);
16035        __tmp.put_i16_le(self.vx);
16036        __tmp.put_i16_le(self.vy);
16037        __tmp.put_i16_le(self.vz);
16038        __tmp.put_u16_le(self.ind_airspeed);
16039        __tmp.put_u16_le(self.true_airspeed);
16040        __tmp.put_i16_le(self.xacc);
16041        __tmp.put_i16_le(self.yacc);
16042        __tmp.put_i16_le(self.zacc);
16043        if matches!(version, MavlinkVersion::V2) {
16044            let len = __tmp.len();
16045            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16046        } else {
16047            __tmp.len()
16048        }
16049    }
16050}
16051#[doc = "id: 242"]
16052#[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
16053#[derive(Debug, Clone, PartialEq)]
16054#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16055#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16056pub struct HOME_POSITION_DATA {
16057    #[doc = "Latitude (WGS84)"]
16058    pub latitude: i32,
16059    #[doc = "Longitude (WGS84)"]
16060    pub longitude: i32,
16061    #[doc = "Altitude (MSL). Positive for up."]
16062    pub altitude: i32,
16063    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
16064    pub x: f32,
16065    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
16066    pub y: f32,
16067    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
16068    pub z: f32,
16069    #[doc = "Quaternion indicating world-to-surface-normal and heading transformation of the takeoff position.         Used to indicate the heading and slope of the ground.         All fields should be set to NaN if an accurate quaternion for both heading and surface slope cannot be supplied."]
16070    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16071    pub q: [f32; 4],
16072    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16073    pub approach_x: f32,
16074    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16075    pub approach_y: f32,
16076    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16077    pub approach_z: f32,
16078    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16079    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16080    pub time_usec: u64,
16081}
16082impl HOME_POSITION_DATA {
16083    pub const ENCODED_LEN: usize = 60usize;
16084    pub const DEFAULT: Self = Self {
16085        latitude: 0_i32,
16086        longitude: 0_i32,
16087        altitude: 0_i32,
16088        x: 0.0_f32,
16089        y: 0.0_f32,
16090        z: 0.0_f32,
16091        q: [0.0_f32; 4usize],
16092        approach_x: 0.0_f32,
16093        approach_y: 0.0_f32,
16094        approach_z: 0.0_f32,
16095        time_usec: 0_u64,
16096    };
16097    #[cfg(feature = "arbitrary")]
16098    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16099        use arbitrary::{Arbitrary, Unstructured};
16100        let mut buf = [0u8; 1024];
16101        rng.fill_bytes(&mut buf);
16102        let mut unstructured = Unstructured::new(&buf);
16103        Self::arbitrary(&mut unstructured).unwrap_or_default()
16104    }
16105}
16106impl Default for HOME_POSITION_DATA {
16107    fn default() -> Self {
16108        Self::DEFAULT.clone()
16109    }
16110}
16111impl MessageData for HOME_POSITION_DATA {
16112    type Message = MavMessage;
16113    const ID: u32 = 242u32;
16114    const NAME: &'static str = "HOME_POSITION";
16115    const EXTRA_CRC: u8 = 104u8;
16116    const ENCODED_LEN: usize = 60usize;
16117    fn deser(
16118        _version: MavlinkVersion,
16119        __input: &[u8],
16120    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16121        let avail_len = __input.len();
16122        let mut payload_buf = [0; Self::ENCODED_LEN];
16123        let mut buf = if avail_len < Self::ENCODED_LEN {
16124            payload_buf[0..avail_len].copy_from_slice(__input);
16125            Bytes::new(&payload_buf)
16126        } else {
16127            Bytes::new(__input)
16128        };
16129        let mut __struct = Self::default();
16130        __struct.latitude = buf.get_i32_le();
16131        __struct.longitude = buf.get_i32_le();
16132        __struct.altitude = buf.get_i32_le();
16133        __struct.x = buf.get_f32_le();
16134        __struct.y = buf.get_f32_le();
16135        __struct.z = buf.get_f32_le();
16136        for v in &mut __struct.q {
16137            let val = buf.get_f32_le();
16138            *v = val;
16139        }
16140        __struct.approach_x = buf.get_f32_le();
16141        __struct.approach_y = buf.get_f32_le();
16142        __struct.approach_z = buf.get_f32_le();
16143        __struct.time_usec = buf.get_u64_le();
16144        Ok(__struct)
16145    }
16146    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16147        let mut __tmp = BytesMut::new(bytes);
16148        #[allow(clippy::absurd_extreme_comparisons)]
16149        #[allow(unused_comparisons)]
16150        if __tmp.remaining() < Self::ENCODED_LEN {
16151            panic!(
16152                "buffer is too small (need {} bytes, but got {})",
16153                Self::ENCODED_LEN,
16154                __tmp.remaining(),
16155            )
16156        }
16157        __tmp.put_i32_le(self.latitude);
16158        __tmp.put_i32_le(self.longitude);
16159        __tmp.put_i32_le(self.altitude);
16160        __tmp.put_f32_le(self.x);
16161        __tmp.put_f32_le(self.y);
16162        __tmp.put_f32_le(self.z);
16163        for val in &self.q {
16164            __tmp.put_f32_le(*val);
16165        }
16166        __tmp.put_f32_le(self.approach_x);
16167        __tmp.put_f32_le(self.approach_y);
16168        __tmp.put_f32_le(self.approach_z);
16169        __tmp.put_u64_le(self.time_usec);
16170        if matches!(version, MavlinkVersion::V2) {
16171            let len = __tmp.len();
16172            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16173        } else {
16174            __tmp.len()
16175        }
16176    }
16177}
16178#[doc = "id: 12920"]
16179#[doc = "Temperature and humidity from hygrometer."]
16180#[derive(Debug, Clone, PartialEq)]
16181#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16182#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16183pub struct HYGROMETER_SENSOR_DATA {
16184    #[doc = "Temperature"]
16185    pub temperature: i16,
16186    #[doc = "Humidity"]
16187    pub humidity: u16,
16188    #[doc = "Hygrometer ID"]
16189    pub id: u8,
16190}
16191impl HYGROMETER_SENSOR_DATA {
16192    pub const ENCODED_LEN: usize = 5usize;
16193    pub const DEFAULT: Self = Self {
16194        temperature: 0_i16,
16195        humidity: 0_u16,
16196        id: 0_u8,
16197    };
16198    #[cfg(feature = "arbitrary")]
16199    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16200        use arbitrary::{Arbitrary, Unstructured};
16201        let mut buf = [0u8; 1024];
16202        rng.fill_bytes(&mut buf);
16203        let mut unstructured = Unstructured::new(&buf);
16204        Self::arbitrary(&mut unstructured).unwrap_or_default()
16205    }
16206}
16207impl Default for HYGROMETER_SENSOR_DATA {
16208    fn default() -> Self {
16209        Self::DEFAULT.clone()
16210    }
16211}
16212impl MessageData for HYGROMETER_SENSOR_DATA {
16213    type Message = MavMessage;
16214    const ID: u32 = 12920u32;
16215    const NAME: &'static str = "HYGROMETER_SENSOR";
16216    const EXTRA_CRC: u8 = 20u8;
16217    const ENCODED_LEN: usize = 5usize;
16218    fn deser(
16219        _version: MavlinkVersion,
16220        __input: &[u8],
16221    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16222        let avail_len = __input.len();
16223        let mut payload_buf = [0; Self::ENCODED_LEN];
16224        let mut buf = if avail_len < Self::ENCODED_LEN {
16225            payload_buf[0..avail_len].copy_from_slice(__input);
16226            Bytes::new(&payload_buf)
16227        } else {
16228            Bytes::new(__input)
16229        };
16230        let mut __struct = Self::default();
16231        __struct.temperature = buf.get_i16_le();
16232        __struct.humidity = buf.get_u16_le();
16233        __struct.id = buf.get_u8();
16234        Ok(__struct)
16235    }
16236    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16237        let mut __tmp = BytesMut::new(bytes);
16238        #[allow(clippy::absurd_extreme_comparisons)]
16239        #[allow(unused_comparisons)]
16240        if __tmp.remaining() < Self::ENCODED_LEN {
16241            panic!(
16242                "buffer is too small (need {} bytes, but got {})",
16243                Self::ENCODED_LEN,
16244                __tmp.remaining(),
16245            )
16246        }
16247        __tmp.put_i16_le(self.temperature);
16248        __tmp.put_u16_le(self.humidity);
16249        __tmp.put_u8(self.id);
16250        if matches!(version, MavlinkVersion::V2) {
16251            let len = __tmp.len();
16252            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16253        } else {
16254            __tmp.len()
16255        }
16256    }
16257}
16258#[doc = "id: 440"]
16259#[doc = "Illuminator status."]
16260#[derive(Debug, Clone, PartialEq)]
16261#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16262#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16263pub struct ILLUMINATOR_STATUS_DATA {
16264    #[doc = "Time since the start-up of the illuminator in ms"]
16265    pub uptime_ms: u32,
16266    #[doc = "Errors"]
16267    pub error_status: IlluminatorErrorFlags,
16268    #[doc = "Illuminator brightness"]
16269    pub brightness: f32,
16270    #[doc = "Illuminator strobing period in seconds"]
16271    pub strobe_period: f32,
16272    #[doc = "Illuminator strobing duty cycle"]
16273    pub strobe_duty_cycle: f32,
16274    #[doc = "Temperature in Celsius"]
16275    pub temp_c: f32,
16276    #[doc = "Minimum strobing period in seconds"]
16277    pub min_strobe_period: f32,
16278    #[doc = "Maximum strobing period in seconds"]
16279    pub max_strobe_period: f32,
16280    #[doc = "0: Illuminators OFF, 1: Illuminators ON"]
16281    pub enable: u8,
16282    #[doc = "Supported illuminator modes"]
16283    pub mode_bitmask: IlluminatorMode,
16284    #[doc = "Illuminator mode"]
16285    pub mode: IlluminatorMode,
16286}
16287impl ILLUMINATOR_STATUS_DATA {
16288    pub const ENCODED_LEN: usize = 35usize;
16289    pub const DEFAULT: Self = Self {
16290        uptime_ms: 0_u32,
16291        error_status: IlluminatorErrorFlags::DEFAULT,
16292        brightness: 0.0_f32,
16293        strobe_period: 0.0_f32,
16294        strobe_duty_cycle: 0.0_f32,
16295        temp_c: 0.0_f32,
16296        min_strobe_period: 0.0_f32,
16297        max_strobe_period: 0.0_f32,
16298        enable: 0_u8,
16299        mode_bitmask: IlluminatorMode::DEFAULT,
16300        mode: IlluminatorMode::DEFAULT,
16301    };
16302    #[cfg(feature = "arbitrary")]
16303    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16304        use arbitrary::{Arbitrary, Unstructured};
16305        let mut buf = [0u8; 1024];
16306        rng.fill_bytes(&mut buf);
16307        let mut unstructured = Unstructured::new(&buf);
16308        Self::arbitrary(&mut unstructured).unwrap_or_default()
16309    }
16310}
16311impl Default for ILLUMINATOR_STATUS_DATA {
16312    fn default() -> Self {
16313        Self::DEFAULT.clone()
16314    }
16315}
16316impl MessageData for ILLUMINATOR_STATUS_DATA {
16317    type Message = MavMessage;
16318    const ID: u32 = 440u32;
16319    const NAME: &'static str = "ILLUMINATOR_STATUS";
16320    const EXTRA_CRC: u8 = 66u8;
16321    const ENCODED_LEN: usize = 35usize;
16322    fn deser(
16323        _version: MavlinkVersion,
16324        __input: &[u8],
16325    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16326        let avail_len = __input.len();
16327        let mut payload_buf = [0; Self::ENCODED_LEN];
16328        let mut buf = if avail_len < Self::ENCODED_LEN {
16329            payload_buf[0..avail_len].copy_from_slice(__input);
16330            Bytes::new(&payload_buf)
16331        } else {
16332            Bytes::new(__input)
16333        };
16334        let mut __struct = Self::default();
16335        __struct.uptime_ms = buf.get_u32_le();
16336        let tmp = buf.get_u32_le();
16337        __struct.error_status = IlluminatorErrorFlags::from_bits(
16338            tmp & IlluminatorErrorFlags::all().bits(),
16339        )
16340        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16341            flag_type: "IlluminatorErrorFlags",
16342            value: tmp as u32,
16343        })?;
16344        __struct.brightness = buf.get_f32_le();
16345        __struct.strobe_period = buf.get_f32_le();
16346        __struct.strobe_duty_cycle = buf.get_f32_le();
16347        __struct.temp_c = buf.get_f32_le();
16348        __struct.min_strobe_period = buf.get_f32_le();
16349        __struct.max_strobe_period = buf.get_f32_le();
16350        __struct.enable = buf.get_u8();
16351        let tmp = buf.get_u8();
16352        __struct.mode_bitmask =
16353            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16354                enum_type: "IlluminatorMode",
16355                value: tmp as u32,
16356            })?;
16357        let tmp = buf.get_u8();
16358        __struct.mode =
16359            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16360                enum_type: "IlluminatorMode",
16361                value: tmp as u32,
16362            })?;
16363        Ok(__struct)
16364    }
16365    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16366        let mut __tmp = BytesMut::new(bytes);
16367        #[allow(clippy::absurd_extreme_comparisons)]
16368        #[allow(unused_comparisons)]
16369        if __tmp.remaining() < Self::ENCODED_LEN {
16370            panic!(
16371                "buffer is too small (need {} bytes, but got {})",
16372                Self::ENCODED_LEN,
16373                __tmp.remaining(),
16374            )
16375        }
16376        __tmp.put_u32_le(self.uptime_ms);
16377        __tmp.put_u32_le(self.error_status.bits());
16378        __tmp.put_f32_le(self.brightness);
16379        __tmp.put_f32_le(self.strobe_period);
16380        __tmp.put_f32_le(self.strobe_duty_cycle);
16381        __tmp.put_f32_le(self.temp_c);
16382        __tmp.put_f32_le(self.min_strobe_period);
16383        __tmp.put_f32_le(self.max_strobe_period);
16384        __tmp.put_u8(self.enable);
16385        __tmp.put_u8(self.mode_bitmask as u8);
16386        __tmp.put_u8(self.mode as u8);
16387        if matches!(version, MavlinkVersion::V2) {
16388            let len = __tmp.len();
16389            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16390        } else {
16391            __tmp.len()
16392        }
16393    }
16394}
16395#[doc = "id: 335"]
16396#[doc = "Status of the Iridium SBD link."]
16397#[derive(Debug, Clone, PartialEq)]
16398#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16399#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16400pub struct ISBD_LINK_STATUS_DATA {
16401    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16402    pub timestamp: u64,
16403    #[doc = "Timestamp of the last successful sbd session. The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16404    pub last_heartbeat: u64,
16405    #[doc = "Number of failed SBD sessions."]
16406    pub failed_sessions: u16,
16407    #[doc = "Number of successful SBD sessions."]
16408    pub successful_sessions: u16,
16409    #[doc = "Signal quality equal to the number of bars displayed on the ISU signal strength indicator. Range is 0 to 5, where 0 indicates no signal and 5 indicates maximum signal strength."]
16410    pub signal_quality: u8,
16411    #[doc = "1: Ring call pending, 0: No call pending."]
16412    pub ring_pending: u8,
16413    #[doc = "1: Transmission session pending, 0: No transmission session pending."]
16414    pub tx_session_pending: u8,
16415    #[doc = "1: Receiving session pending, 0: No receiving session pending."]
16416    pub rx_session_pending: u8,
16417}
16418impl ISBD_LINK_STATUS_DATA {
16419    pub const ENCODED_LEN: usize = 24usize;
16420    pub const DEFAULT: Self = Self {
16421        timestamp: 0_u64,
16422        last_heartbeat: 0_u64,
16423        failed_sessions: 0_u16,
16424        successful_sessions: 0_u16,
16425        signal_quality: 0_u8,
16426        ring_pending: 0_u8,
16427        tx_session_pending: 0_u8,
16428        rx_session_pending: 0_u8,
16429    };
16430    #[cfg(feature = "arbitrary")]
16431    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16432        use arbitrary::{Arbitrary, Unstructured};
16433        let mut buf = [0u8; 1024];
16434        rng.fill_bytes(&mut buf);
16435        let mut unstructured = Unstructured::new(&buf);
16436        Self::arbitrary(&mut unstructured).unwrap_or_default()
16437    }
16438}
16439impl Default for ISBD_LINK_STATUS_DATA {
16440    fn default() -> Self {
16441        Self::DEFAULT.clone()
16442    }
16443}
16444impl MessageData for ISBD_LINK_STATUS_DATA {
16445    type Message = MavMessage;
16446    const ID: u32 = 335u32;
16447    const NAME: &'static str = "ISBD_LINK_STATUS";
16448    const EXTRA_CRC: u8 = 225u8;
16449    const ENCODED_LEN: usize = 24usize;
16450    fn deser(
16451        _version: MavlinkVersion,
16452        __input: &[u8],
16453    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16454        let avail_len = __input.len();
16455        let mut payload_buf = [0; Self::ENCODED_LEN];
16456        let mut buf = if avail_len < Self::ENCODED_LEN {
16457            payload_buf[0..avail_len].copy_from_slice(__input);
16458            Bytes::new(&payload_buf)
16459        } else {
16460            Bytes::new(__input)
16461        };
16462        let mut __struct = Self::default();
16463        __struct.timestamp = buf.get_u64_le();
16464        __struct.last_heartbeat = buf.get_u64_le();
16465        __struct.failed_sessions = buf.get_u16_le();
16466        __struct.successful_sessions = buf.get_u16_le();
16467        __struct.signal_quality = buf.get_u8();
16468        __struct.ring_pending = buf.get_u8();
16469        __struct.tx_session_pending = buf.get_u8();
16470        __struct.rx_session_pending = buf.get_u8();
16471        Ok(__struct)
16472    }
16473    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16474        let mut __tmp = BytesMut::new(bytes);
16475        #[allow(clippy::absurd_extreme_comparisons)]
16476        #[allow(unused_comparisons)]
16477        if __tmp.remaining() < Self::ENCODED_LEN {
16478            panic!(
16479                "buffer is too small (need {} bytes, but got {})",
16480                Self::ENCODED_LEN,
16481                __tmp.remaining(),
16482            )
16483        }
16484        __tmp.put_u64_le(self.timestamp);
16485        __tmp.put_u64_le(self.last_heartbeat);
16486        __tmp.put_u16_le(self.failed_sessions);
16487        __tmp.put_u16_le(self.successful_sessions);
16488        __tmp.put_u8(self.signal_quality);
16489        __tmp.put_u8(self.ring_pending);
16490        __tmp.put_u8(self.tx_session_pending);
16491        __tmp.put_u8(self.rx_session_pending);
16492        if matches!(version, MavlinkVersion::V2) {
16493            let len = __tmp.len();
16494            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16495        } else {
16496            __tmp.len()
16497        }
16498    }
16499}
16500#[doc = "id: 149"]
16501#[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
16502#[derive(Debug, Clone, PartialEq)]
16503#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16504#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16505pub struct LANDING_TARGET_DATA {
16506    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16507    pub time_usec: u64,
16508    #[doc = "X-axis angular offset of the target from the center of the image"]
16509    pub angle_x: f32,
16510    #[doc = "Y-axis angular offset of the target from the center of the image"]
16511    pub angle_y: f32,
16512    #[doc = "Distance to the target from the vehicle"]
16513    pub distance: f32,
16514    #[doc = "Size of target along x-axis"]
16515    pub size_x: f32,
16516    #[doc = "Size of target along y-axis"]
16517    pub size_y: f32,
16518    #[doc = "The ID of the target if multiple targets are present"]
16519    pub target_num: u8,
16520    #[doc = "Coordinate frame used for following fields."]
16521    pub frame: MavFrame,
16522    #[doc = "X Position of the landing target in MAV_FRAME"]
16523    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16524    pub x: f32,
16525    #[doc = "Y Position of the landing target in MAV_FRAME"]
16526    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16527    pub y: f32,
16528    #[doc = "Z Position of the landing target in MAV_FRAME"]
16529    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16530    pub z: f32,
16531    #[doc = "Quaternion of landing target orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
16532    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16533    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16534    pub q: [f32; 4],
16535    #[doc = "Type of landing target"]
16536    #[cfg_attr(feature = "serde", serde(default))]
16537    pub mavtype: LandingTargetType,
16538    #[doc = "Boolean indicating whether the position fields (x, y, z, q, type) contain valid target position information (valid: 1, invalid: 0). Default is 0 (invalid)."]
16539    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16540    pub position_valid: u8,
16541}
16542impl LANDING_TARGET_DATA {
16543    pub const ENCODED_LEN: usize = 60usize;
16544    pub const DEFAULT: Self = Self {
16545        time_usec: 0_u64,
16546        angle_x: 0.0_f32,
16547        angle_y: 0.0_f32,
16548        distance: 0.0_f32,
16549        size_x: 0.0_f32,
16550        size_y: 0.0_f32,
16551        target_num: 0_u8,
16552        frame: MavFrame::DEFAULT,
16553        x: 0.0_f32,
16554        y: 0.0_f32,
16555        z: 0.0_f32,
16556        q: [0.0_f32; 4usize],
16557        mavtype: LandingTargetType::DEFAULT,
16558        position_valid: 0_u8,
16559    };
16560    #[cfg(feature = "arbitrary")]
16561    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16562        use arbitrary::{Arbitrary, Unstructured};
16563        let mut buf = [0u8; 1024];
16564        rng.fill_bytes(&mut buf);
16565        let mut unstructured = Unstructured::new(&buf);
16566        Self::arbitrary(&mut unstructured).unwrap_or_default()
16567    }
16568}
16569impl Default for LANDING_TARGET_DATA {
16570    fn default() -> Self {
16571        Self::DEFAULT.clone()
16572    }
16573}
16574impl MessageData for LANDING_TARGET_DATA {
16575    type Message = MavMessage;
16576    const ID: u32 = 149u32;
16577    const NAME: &'static str = "LANDING_TARGET";
16578    const EXTRA_CRC: u8 = 200u8;
16579    const ENCODED_LEN: usize = 60usize;
16580    fn deser(
16581        _version: MavlinkVersion,
16582        __input: &[u8],
16583    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16584        let avail_len = __input.len();
16585        let mut payload_buf = [0; Self::ENCODED_LEN];
16586        let mut buf = if avail_len < Self::ENCODED_LEN {
16587            payload_buf[0..avail_len].copy_from_slice(__input);
16588            Bytes::new(&payload_buf)
16589        } else {
16590            Bytes::new(__input)
16591        };
16592        let mut __struct = Self::default();
16593        __struct.time_usec = buf.get_u64_le();
16594        __struct.angle_x = buf.get_f32_le();
16595        __struct.angle_y = buf.get_f32_le();
16596        __struct.distance = buf.get_f32_le();
16597        __struct.size_x = buf.get_f32_le();
16598        __struct.size_y = buf.get_f32_le();
16599        __struct.target_num = buf.get_u8();
16600        let tmp = buf.get_u8();
16601        __struct.frame =
16602            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16603                enum_type: "MavFrame",
16604                value: tmp as u32,
16605            })?;
16606        __struct.x = buf.get_f32_le();
16607        __struct.y = buf.get_f32_le();
16608        __struct.z = buf.get_f32_le();
16609        for v in &mut __struct.q {
16610            let val = buf.get_f32_le();
16611            *v = val;
16612        }
16613        let tmp = buf.get_u8();
16614        __struct.mavtype =
16615            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16616                enum_type: "LandingTargetType",
16617                value: tmp as u32,
16618            })?;
16619        __struct.position_valid = buf.get_u8();
16620        Ok(__struct)
16621    }
16622    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16623        let mut __tmp = BytesMut::new(bytes);
16624        #[allow(clippy::absurd_extreme_comparisons)]
16625        #[allow(unused_comparisons)]
16626        if __tmp.remaining() < Self::ENCODED_LEN {
16627            panic!(
16628                "buffer is too small (need {} bytes, but got {})",
16629                Self::ENCODED_LEN,
16630                __tmp.remaining(),
16631            )
16632        }
16633        __tmp.put_u64_le(self.time_usec);
16634        __tmp.put_f32_le(self.angle_x);
16635        __tmp.put_f32_le(self.angle_y);
16636        __tmp.put_f32_le(self.distance);
16637        __tmp.put_f32_le(self.size_x);
16638        __tmp.put_f32_le(self.size_y);
16639        __tmp.put_u8(self.target_num);
16640        __tmp.put_u8(self.frame as u8);
16641        __tmp.put_f32_le(self.x);
16642        __tmp.put_f32_le(self.y);
16643        __tmp.put_f32_le(self.z);
16644        for val in &self.q {
16645            __tmp.put_f32_le(*val);
16646        }
16647        __tmp.put_u8(self.mavtype as u8);
16648        __tmp.put_u8(self.position_valid);
16649        if matches!(version, MavlinkVersion::V2) {
16650            let len = __tmp.len();
16651            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16652        } else {
16653            __tmp.len()
16654        }
16655    }
16656}
16657#[doc = "id: 8"]
16658#[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
16659#[derive(Debug, Clone, PartialEq)]
16660#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16661#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16662pub struct LINK_NODE_STATUS_DATA {
16663    #[doc = "Timestamp (time since system boot)."]
16664    pub timestamp: u64,
16665    #[doc = "Transmit rate"]
16666    pub tx_rate: u32,
16667    #[doc = "Receive rate"]
16668    pub rx_rate: u32,
16669    #[doc = "Messages sent"]
16670    pub messages_sent: u32,
16671    #[doc = "Messages received (estimated from counting seq)"]
16672    pub messages_received: u32,
16673    #[doc = "Messages lost (estimated from counting seq)"]
16674    pub messages_lost: u32,
16675    #[doc = "Number of bytes that could not be parsed correctly."]
16676    pub rx_parse_err: u16,
16677    #[doc = "Transmit buffer overflows. This number wraps around as it reaches UINT16_MAX"]
16678    pub tx_overflows: u16,
16679    #[doc = "Receive buffer overflows. This number wraps around as it reaches UINT16_MAX"]
16680    pub rx_overflows: u16,
16681    #[doc = "Remaining free transmit buffer space"]
16682    pub tx_buf: u8,
16683    #[doc = "Remaining free receive buffer space"]
16684    pub rx_buf: u8,
16685}
16686impl LINK_NODE_STATUS_DATA {
16687    pub const ENCODED_LEN: usize = 36usize;
16688    pub const DEFAULT: Self = Self {
16689        timestamp: 0_u64,
16690        tx_rate: 0_u32,
16691        rx_rate: 0_u32,
16692        messages_sent: 0_u32,
16693        messages_received: 0_u32,
16694        messages_lost: 0_u32,
16695        rx_parse_err: 0_u16,
16696        tx_overflows: 0_u16,
16697        rx_overflows: 0_u16,
16698        tx_buf: 0_u8,
16699        rx_buf: 0_u8,
16700    };
16701    #[cfg(feature = "arbitrary")]
16702    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16703        use arbitrary::{Arbitrary, Unstructured};
16704        let mut buf = [0u8; 1024];
16705        rng.fill_bytes(&mut buf);
16706        let mut unstructured = Unstructured::new(&buf);
16707        Self::arbitrary(&mut unstructured).unwrap_or_default()
16708    }
16709}
16710impl Default for LINK_NODE_STATUS_DATA {
16711    fn default() -> Self {
16712        Self::DEFAULT.clone()
16713    }
16714}
16715impl MessageData for LINK_NODE_STATUS_DATA {
16716    type Message = MavMessage;
16717    const ID: u32 = 8u32;
16718    const NAME: &'static str = "LINK_NODE_STATUS";
16719    const EXTRA_CRC: u8 = 117u8;
16720    const ENCODED_LEN: usize = 36usize;
16721    fn deser(
16722        _version: MavlinkVersion,
16723        __input: &[u8],
16724    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16725        let avail_len = __input.len();
16726        let mut payload_buf = [0; Self::ENCODED_LEN];
16727        let mut buf = if avail_len < Self::ENCODED_LEN {
16728            payload_buf[0..avail_len].copy_from_slice(__input);
16729            Bytes::new(&payload_buf)
16730        } else {
16731            Bytes::new(__input)
16732        };
16733        let mut __struct = Self::default();
16734        __struct.timestamp = buf.get_u64_le();
16735        __struct.tx_rate = buf.get_u32_le();
16736        __struct.rx_rate = buf.get_u32_le();
16737        __struct.messages_sent = buf.get_u32_le();
16738        __struct.messages_received = buf.get_u32_le();
16739        __struct.messages_lost = buf.get_u32_le();
16740        __struct.rx_parse_err = buf.get_u16_le();
16741        __struct.tx_overflows = buf.get_u16_le();
16742        __struct.rx_overflows = buf.get_u16_le();
16743        __struct.tx_buf = buf.get_u8();
16744        __struct.rx_buf = buf.get_u8();
16745        Ok(__struct)
16746    }
16747    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16748        let mut __tmp = BytesMut::new(bytes);
16749        #[allow(clippy::absurd_extreme_comparisons)]
16750        #[allow(unused_comparisons)]
16751        if __tmp.remaining() < Self::ENCODED_LEN {
16752            panic!(
16753                "buffer is too small (need {} bytes, but got {})",
16754                Self::ENCODED_LEN,
16755                __tmp.remaining(),
16756            )
16757        }
16758        __tmp.put_u64_le(self.timestamp);
16759        __tmp.put_u32_le(self.tx_rate);
16760        __tmp.put_u32_le(self.rx_rate);
16761        __tmp.put_u32_le(self.messages_sent);
16762        __tmp.put_u32_le(self.messages_received);
16763        __tmp.put_u32_le(self.messages_lost);
16764        __tmp.put_u16_le(self.rx_parse_err);
16765        __tmp.put_u16_le(self.tx_overflows);
16766        __tmp.put_u16_le(self.rx_overflows);
16767        __tmp.put_u8(self.tx_buf);
16768        __tmp.put_u8(self.rx_buf);
16769        if matches!(version, MavlinkVersion::V2) {
16770            let len = __tmp.len();
16771            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16772        } else {
16773            __tmp.len()
16774        }
16775    }
16776}
16777#[doc = "id: 32"]
16778#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
16779#[derive(Debug, Clone, PartialEq)]
16780#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16781#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16782pub struct LOCAL_POSITION_NED_DATA {
16783    #[doc = "Timestamp (time since system boot)."]
16784    pub time_boot_ms: u32,
16785    #[doc = "X Position"]
16786    pub x: f32,
16787    #[doc = "Y Position"]
16788    pub y: f32,
16789    #[doc = "Z Position"]
16790    pub z: f32,
16791    #[doc = "X Speed"]
16792    pub vx: f32,
16793    #[doc = "Y Speed"]
16794    pub vy: f32,
16795    #[doc = "Z Speed"]
16796    pub vz: f32,
16797}
16798impl LOCAL_POSITION_NED_DATA {
16799    pub const ENCODED_LEN: usize = 28usize;
16800    pub const DEFAULT: Self = Self {
16801        time_boot_ms: 0_u32,
16802        x: 0.0_f32,
16803        y: 0.0_f32,
16804        z: 0.0_f32,
16805        vx: 0.0_f32,
16806        vy: 0.0_f32,
16807        vz: 0.0_f32,
16808    };
16809    #[cfg(feature = "arbitrary")]
16810    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16811        use arbitrary::{Arbitrary, Unstructured};
16812        let mut buf = [0u8; 1024];
16813        rng.fill_bytes(&mut buf);
16814        let mut unstructured = Unstructured::new(&buf);
16815        Self::arbitrary(&mut unstructured).unwrap_or_default()
16816    }
16817}
16818impl Default for LOCAL_POSITION_NED_DATA {
16819    fn default() -> Self {
16820        Self::DEFAULT.clone()
16821    }
16822}
16823impl MessageData for LOCAL_POSITION_NED_DATA {
16824    type Message = MavMessage;
16825    const ID: u32 = 32u32;
16826    const NAME: &'static str = "LOCAL_POSITION_NED";
16827    const EXTRA_CRC: u8 = 185u8;
16828    const ENCODED_LEN: usize = 28usize;
16829    fn deser(
16830        _version: MavlinkVersion,
16831        __input: &[u8],
16832    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16833        let avail_len = __input.len();
16834        let mut payload_buf = [0; Self::ENCODED_LEN];
16835        let mut buf = if avail_len < Self::ENCODED_LEN {
16836            payload_buf[0..avail_len].copy_from_slice(__input);
16837            Bytes::new(&payload_buf)
16838        } else {
16839            Bytes::new(__input)
16840        };
16841        let mut __struct = Self::default();
16842        __struct.time_boot_ms = buf.get_u32_le();
16843        __struct.x = buf.get_f32_le();
16844        __struct.y = buf.get_f32_le();
16845        __struct.z = buf.get_f32_le();
16846        __struct.vx = buf.get_f32_le();
16847        __struct.vy = buf.get_f32_le();
16848        __struct.vz = buf.get_f32_le();
16849        Ok(__struct)
16850    }
16851    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16852        let mut __tmp = BytesMut::new(bytes);
16853        #[allow(clippy::absurd_extreme_comparisons)]
16854        #[allow(unused_comparisons)]
16855        if __tmp.remaining() < Self::ENCODED_LEN {
16856            panic!(
16857                "buffer is too small (need {} bytes, but got {})",
16858                Self::ENCODED_LEN,
16859                __tmp.remaining(),
16860            )
16861        }
16862        __tmp.put_u32_le(self.time_boot_ms);
16863        __tmp.put_f32_le(self.x);
16864        __tmp.put_f32_le(self.y);
16865        __tmp.put_f32_le(self.z);
16866        __tmp.put_f32_le(self.vx);
16867        __tmp.put_f32_le(self.vy);
16868        __tmp.put_f32_le(self.vz);
16869        if matches!(version, MavlinkVersion::V2) {
16870            let len = __tmp.len();
16871            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16872        } else {
16873            __tmp.len()
16874        }
16875    }
16876}
16877#[doc = "id: 64"]
16878#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
16879#[derive(Debug, Clone, PartialEq)]
16880#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16881#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16882pub struct LOCAL_POSITION_NED_COV_DATA {
16883    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16884    pub time_usec: u64,
16885    #[doc = "X Position"]
16886    pub x: f32,
16887    #[doc = "Y Position"]
16888    pub y: f32,
16889    #[doc = "Z Position"]
16890    pub z: f32,
16891    #[doc = "X Speed"]
16892    pub vx: f32,
16893    #[doc = "Y Speed"]
16894    pub vy: f32,
16895    #[doc = "Z Speed"]
16896    pub vz: f32,
16897    #[doc = "X Acceleration"]
16898    pub ax: f32,
16899    #[doc = "Y Acceleration"]
16900    pub ay: f32,
16901    #[doc = "Z Acceleration"]
16902    pub az: f32,
16903    #[doc = "Row-major representation of position, velocity and acceleration 9x9 cross-covariance matrix upper right triangle (states: x, y, z, vx, vy, vz, ax, ay, az; first nine entries are the first ROW, next eight entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
16904    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16905    pub covariance: [f32; 45],
16906    #[doc = "Class id of the estimator this estimate originated from."]
16907    pub estimator_type: MavEstimatorType,
16908}
16909impl LOCAL_POSITION_NED_COV_DATA {
16910    pub const ENCODED_LEN: usize = 225usize;
16911    pub const DEFAULT: Self = Self {
16912        time_usec: 0_u64,
16913        x: 0.0_f32,
16914        y: 0.0_f32,
16915        z: 0.0_f32,
16916        vx: 0.0_f32,
16917        vy: 0.0_f32,
16918        vz: 0.0_f32,
16919        ax: 0.0_f32,
16920        ay: 0.0_f32,
16921        az: 0.0_f32,
16922        covariance: [0.0_f32; 45usize],
16923        estimator_type: MavEstimatorType::DEFAULT,
16924    };
16925    #[cfg(feature = "arbitrary")]
16926    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16927        use arbitrary::{Arbitrary, Unstructured};
16928        let mut buf = [0u8; 1024];
16929        rng.fill_bytes(&mut buf);
16930        let mut unstructured = Unstructured::new(&buf);
16931        Self::arbitrary(&mut unstructured).unwrap_or_default()
16932    }
16933}
16934impl Default for LOCAL_POSITION_NED_COV_DATA {
16935    fn default() -> Self {
16936        Self::DEFAULT.clone()
16937    }
16938}
16939impl MessageData for LOCAL_POSITION_NED_COV_DATA {
16940    type Message = MavMessage;
16941    const ID: u32 = 64u32;
16942    const NAME: &'static str = "LOCAL_POSITION_NED_COV";
16943    const EXTRA_CRC: u8 = 191u8;
16944    const ENCODED_LEN: usize = 225usize;
16945    fn deser(
16946        _version: MavlinkVersion,
16947        __input: &[u8],
16948    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16949        let avail_len = __input.len();
16950        let mut payload_buf = [0; Self::ENCODED_LEN];
16951        let mut buf = if avail_len < Self::ENCODED_LEN {
16952            payload_buf[0..avail_len].copy_from_slice(__input);
16953            Bytes::new(&payload_buf)
16954        } else {
16955            Bytes::new(__input)
16956        };
16957        let mut __struct = Self::default();
16958        __struct.time_usec = buf.get_u64_le();
16959        __struct.x = buf.get_f32_le();
16960        __struct.y = buf.get_f32_le();
16961        __struct.z = buf.get_f32_le();
16962        __struct.vx = buf.get_f32_le();
16963        __struct.vy = buf.get_f32_le();
16964        __struct.vz = buf.get_f32_le();
16965        __struct.ax = buf.get_f32_le();
16966        __struct.ay = buf.get_f32_le();
16967        __struct.az = buf.get_f32_le();
16968        for v in &mut __struct.covariance {
16969            let val = buf.get_f32_le();
16970            *v = val;
16971        }
16972        let tmp = buf.get_u8();
16973        __struct.estimator_type =
16974            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16975                enum_type: "MavEstimatorType",
16976                value: tmp as u32,
16977            })?;
16978        Ok(__struct)
16979    }
16980    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16981        let mut __tmp = BytesMut::new(bytes);
16982        #[allow(clippy::absurd_extreme_comparisons)]
16983        #[allow(unused_comparisons)]
16984        if __tmp.remaining() < Self::ENCODED_LEN {
16985            panic!(
16986                "buffer is too small (need {} bytes, but got {})",
16987                Self::ENCODED_LEN,
16988                __tmp.remaining(),
16989            )
16990        }
16991        __tmp.put_u64_le(self.time_usec);
16992        __tmp.put_f32_le(self.x);
16993        __tmp.put_f32_le(self.y);
16994        __tmp.put_f32_le(self.z);
16995        __tmp.put_f32_le(self.vx);
16996        __tmp.put_f32_le(self.vy);
16997        __tmp.put_f32_le(self.vz);
16998        __tmp.put_f32_le(self.ax);
16999        __tmp.put_f32_le(self.ay);
17000        __tmp.put_f32_le(self.az);
17001        for val in &self.covariance {
17002            __tmp.put_f32_le(*val);
17003        }
17004        __tmp.put_u8(self.estimator_type as u8);
17005        if matches!(version, MavlinkVersion::V2) {
17006            let len = __tmp.len();
17007            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17008        } else {
17009            __tmp.len()
17010        }
17011    }
17012}
17013#[doc = "id: 89"]
17014#[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17015#[derive(Debug, Clone, PartialEq)]
17016#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17017#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17018pub struct LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17019    #[doc = "Timestamp (time since system boot)."]
17020    pub time_boot_ms: u32,
17021    #[doc = "X Position"]
17022    pub x: f32,
17023    #[doc = "Y Position"]
17024    pub y: f32,
17025    #[doc = "Z Position"]
17026    pub z: f32,
17027    #[doc = "Roll"]
17028    pub roll: f32,
17029    #[doc = "Pitch"]
17030    pub pitch: f32,
17031    #[doc = "Yaw"]
17032    pub yaw: f32,
17033}
17034impl LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17035    pub const ENCODED_LEN: usize = 28usize;
17036    pub const DEFAULT: Self = Self {
17037        time_boot_ms: 0_u32,
17038        x: 0.0_f32,
17039        y: 0.0_f32,
17040        z: 0.0_f32,
17041        roll: 0.0_f32,
17042        pitch: 0.0_f32,
17043        yaw: 0.0_f32,
17044    };
17045    #[cfg(feature = "arbitrary")]
17046    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17047        use arbitrary::{Arbitrary, Unstructured};
17048        let mut buf = [0u8; 1024];
17049        rng.fill_bytes(&mut buf);
17050        let mut unstructured = Unstructured::new(&buf);
17051        Self::arbitrary(&mut unstructured).unwrap_or_default()
17052    }
17053}
17054impl Default for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17055    fn default() -> Self {
17056        Self::DEFAULT.clone()
17057    }
17058}
17059impl MessageData for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17060    type Message = MavMessage;
17061    const ID: u32 = 89u32;
17062    const NAME: &'static str = "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET";
17063    const EXTRA_CRC: u8 = 231u8;
17064    const ENCODED_LEN: usize = 28usize;
17065    fn deser(
17066        _version: MavlinkVersion,
17067        __input: &[u8],
17068    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17069        let avail_len = __input.len();
17070        let mut payload_buf = [0; Self::ENCODED_LEN];
17071        let mut buf = if avail_len < Self::ENCODED_LEN {
17072            payload_buf[0..avail_len].copy_from_slice(__input);
17073            Bytes::new(&payload_buf)
17074        } else {
17075            Bytes::new(__input)
17076        };
17077        let mut __struct = Self::default();
17078        __struct.time_boot_ms = buf.get_u32_le();
17079        __struct.x = buf.get_f32_le();
17080        __struct.y = buf.get_f32_le();
17081        __struct.z = buf.get_f32_le();
17082        __struct.roll = buf.get_f32_le();
17083        __struct.pitch = buf.get_f32_le();
17084        __struct.yaw = buf.get_f32_le();
17085        Ok(__struct)
17086    }
17087    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17088        let mut __tmp = BytesMut::new(bytes);
17089        #[allow(clippy::absurd_extreme_comparisons)]
17090        #[allow(unused_comparisons)]
17091        if __tmp.remaining() < Self::ENCODED_LEN {
17092            panic!(
17093                "buffer is too small (need {} bytes, but got {})",
17094                Self::ENCODED_LEN,
17095                __tmp.remaining(),
17096            )
17097        }
17098        __tmp.put_u32_le(self.time_boot_ms);
17099        __tmp.put_f32_le(self.x);
17100        __tmp.put_f32_le(self.y);
17101        __tmp.put_f32_le(self.z);
17102        __tmp.put_f32_le(self.roll);
17103        __tmp.put_f32_le(self.pitch);
17104        __tmp.put_f32_le(self.yaw);
17105        if matches!(version, MavlinkVersion::V2) {
17106            let len = __tmp.len();
17107            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17108        } else {
17109            __tmp.len()
17110        }
17111    }
17112}
17113#[doc = "id: 268"]
17114#[doc = "An ack for a LOGGING_DATA_ACKED message."]
17115#[derive(Debug, Clone, PartialEq)]
17116#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17117#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17118pub struct LOGGING_ACK_DATA {
17119    #[doc = "sequence number (must match the one in LOGGING_DATA_ACKED)"]
17120    pub sequence: u16,
17121    #[doc = "system ID of the target"]
17122    pub target_system: u8,
17123    #[doc = "component ID of the target"]
17124    pub target_component: u8,
17125}
17126impl LOGGING_ACK_DATA {
17127    pub const ENCODED_LEN: usize = 4usize;
17128    pub const DEFAULT: Self = Self {
17129        sequence: 0_u16,
17130        target_system: 0_u8,
17131        target_component: 0_u8,
17132    };
17133    #[cfg(feature = "arbitrary")]
17134    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17135        use arbitrary::{Arbitrary, Unstructured};
17136        let mut buf = [0u8; 1024];
17137        rng.fill_bytes(&mut buf);
17138        let mut unstructured = Unstructured::new(&buf);
17139        Self::arbitrary(&mut unstructured).unwrap_or_default()
17140    }
17141}
17142impl Default for LOGGING_ACK_DATA {
17143    fn default() -> Self {
17144        Self::DEFAULT.clone()
17145    }
17146}
17147impl MessageData for LOGGING_ACK_DATA {
17148    type Message = MavMessage;
17149    const ID: u32 = 268u32;
17150    const NAME: &'static str = "LOGGING_ACK";
17151    const EXTRA_CRC: u8 = 14u8;
17152    const ENCODED_LEN: usize = 4usize;
17153    fn deser(
17154        _version: MavlinkVersion,
17155        __input: &[u8],
17156    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17157        let avail_len = __input.len();
17158        let mut payload_buf = [0; Self::ENCODED_LEN];
17159        let mut buf = if avail_len < Self::ENCODED_LEN {
17160            payload_buf[0..avail_len].copy_from_slice(__input);
17161            Bytes::new(&payload_buf)
17162        } else {
17163            Bytes::new(__input)
17164        };
17165        let mut __struct = Self::default();
17166        __struct.sequence = buf.get_u16_le();
17167        __struct.target_system = buf.get_u8();
17168        __struct.target_component = buf.get_u8();
17169        Ok(__struct)
17170    }
17171    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17172        let mut __tmp = BytesMut::new(bytes);
17173        #[allow(clippy::absurd_extreme_comparisons)]
17174        #[allow(unused_comparisons)]
17175        if __tmp.remaining() < Self::ENCODED_LEN {
17176            panic!(
17177                "buffer is too small (need {} bytes, but got {})",
17178                Self::ENCODED_LEN,
17179                __tmp.remaining(),
17180            )
17181        }
17182        __tmp.put_u16_le(self.sequence);
17183        __tmp.put_u8(self.target_system);
17184        __tmp.put_u8(self.target_component);
17185        if matches!(version, MavlinkVersion::V2) {
17186            let len = __tmp.len();
17187            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17188        } else {
17189            __tmp.len()
17190        }
17191    }
17192}
17193#[doc = "id: 266"]
17194#[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
17195#[derive(Debug, Clone, PartialEq)]
17196#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17197#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17198pub struct LOGGING_DATA_DATA {
17199    #[doc = "sequence number (can wrap)"]
17200    pub sequence: u16,
17201    #[doc = "system ID of the target"]
17202    pub target_system: u8,
17203    #[doc = "component ID of the target"]
17204    pub target_component: u8,
17205    #[doc = "data length"]
17206    pub length: u8,
17207    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
17208    pub first_message_offset: u8,
17209    #[doc = "logged data"]
17210    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17211    pub data: [u8; 249],
17212}
17213impl LOGGING_DATA_DATA {
17214    pub const ENCODED_LEN: usize = 255usize;
17215    pub const DEFAULT: Self = Self {
17216        sequence: 0_u16,
17217        target_system: 0_u8,
17218        target_component: 0_u8,
17219        length: 0_u8,
17220        first_message_offset: 0_u8,
17221        data: [0_u8; 249usize],
17222    };
17223    #[cfg(feature = "arbitrary")]
17224    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17225        use arbitrary::{Arbitrary, Unstructured};
17226        let mut buf = [0u8; 1024];
17227        rng.fill_bytes(&mut buf);
17228        let mut unstructured = Unstructured::new(&buf);
17229        Self::arbitrary(&mut unstructured).unwrap_or_default()
17230    }
17231}
17232impl Default for LOGGING_DATA_DATA {
17233    fn default() -> Self {
17234        Self::DEFAULT.clone()
17235    }
17236}
17237impl MessageData for LOGGING_DATA_DATA {
17238    type Message = MavMessage;
17239    const ID: u32 = 266u32;
17240    const NAME: &'static str = "LOGGING_DATA";
17241    const EXTRA_CRC: u8 = 193u8;
17242    const ENCODED_LEN: usize = 255usize;
17243    fn deser(
17244        _version: MavlinkVersion,
17245        __input: &[u8],
17246    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17247        let avail_len = __input.len();
17248        let mut payload_buf = [0; Self::ENCODED_LEN];
17249        let mut buf = if avail_len < Self::ENCODED_LEN {
17250            payload_buf[0..avail_len].copy_from_slice(__input);
17251            Bytes::new(&payload_buf)
17252        } else {
17253            Bytes::new(__input)
17254        };
17255        let mut __struct = Self::default();
17256        __struct.sequence = buf.get_u16_le();
17257        __struct.target_system = buf.get_u8();
17258        __struct.target_component = buf.get_u8();
17259        __struct.length = buf.get_u8();
17260        __struct.first_message_offset = buf.get_u8();
17261        for v in &mut __struct.data {
17262            let val = buf.get_u8();
17263            *v = val;
17264        }
17265        Ok(__struct)
17266    }
17267    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17268        let mut __tmp = BytesMut::new(bytes);
17269        #[allow(clippy::absurd_extreme_comparisons)]
17270        #[allow(unused_comparisons)]
17271        if __tmp.remaining() < Self::ENCODED_LEN {
17272            panic!(
17273                "buffer is too small (need {} bytes, but got {})",
17274                Self::ENCODED_LEN,
17275                __tmp.remaining(),
17276            )
17277        }
17278        __tmp.put_u16_le(self.sequence);
17279        __tmp.put_u8(self.target_system);
17280        __tmp.put_u8(self.target_component);
17281        __tmp.put_u8(self.length);
17282        __tmp.put_u8(self.first_message_offset);
17283        for val in &self.data {
17284            __tmp.put_u8(*val);
17285        }
17286        if matches!(version, MavlinkVersion::V2) {
17287            let len = __tmp.len();
17288            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17289        } else {
17290            __tmp.len()
17291        }
17292    }
17293}
17294#[doc = "id: 267"]
17295#[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
17296#[derive(Debug, Clone, PartialEq)]
17297#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17298#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17299pub struct LOGGING_DATA_ACKED_DATA {
17300    #[doc = "sequence number (can wrap)"]
17301    pub sequence: u16,
17302    #[doc = "system ID of the target"]
17303    pub target_system: u8,
17304    #[doc = "component ID of the target"]
17305    pub target_component: u8,
17306    #[doc = "data length"]
17307    pub length: u8,
17308    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
17309    pub first_message_offset: u8,
17310    #[doc = "logged data"]
17311    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17312    pub data: [u8; 249],
17313}
17314impl LOGGING_DATA_ACKED_DATA {
17315    pub const ENCODED_LEN: usize = 255usize;
17316    pub const DEFAULT: Self = Self {
17317        sequence: 0_u16,
17318        target_system: 0_u8,
17319        target_component: 0_u8,
17320        length: 0_u8,
17321        first_message_offset: 0_u8,
17322        data: [0_u8; 249usize],
17323    };
17324    #[cfg(feature = "arbitrary")]
17325    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17326        use arbitrary::{Arbitrary, Unstructured};
17327        let mut buf = [0u8; 1024];
17328        rng.fill_bytes(&mut buf);
17329        let mut unstructured = Unstructured::new(&buf);
17330        Self::arbitrary(&mut unstructured).unwrap_or_default()
17331    }
17332}
17333impl Default for LOGGING_DATA_ACKED_DATA {
17334    fn default() -> Self {
17335        Self::DEFAULT.clone()
17336    }
17337}
17338impl MessageData for LOGGING_DATA_ACKED_DATA {
17339    type Message = MavMessage;
17340    const ID: u32 = 267u32;
17341    const NAME: &'static str = "LOGGING_DATA_ACKED";
17342    const EXTRA_CRC: u8 = 35u8;
17343    const ENCODED_LEN: usize = 255usize;
17344    fn deser(
17345        _version: MavlinkVersion,
17346        __input: &[u8],
17347    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17348        let avail_len = __input.len();
17349        let mut payload_buf = [0; Self::ENCODED_LEN];
17350        let mut buf = if avail_len < Self::ENCODED_LEN {
17351            payload_buf[0..avail_len].copy_from_slice(__input);
17352            Bytes::new(&payload_buf)
17353        } else {
17354            Bytes::new(__input)
17355        };
17356        let mut __struct = Self::default();
17357        __struct.sequence = buf.get_u16_le();
17358        __struct.target_system = buf.get_u8();
17359        __struct.target_component = buf.get_u8();
17360        __struct.length = buf.get_u8();
17361        __struct.first_message_offset = buf.get_u8();
17362        for v in &mut __struct.data {
17363            let val = buf.get_u8();
17364            *v = val;
17365        }
17366        Ok(__struct)
17367    }
17368    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17369        let mut __tmp = BytesMut::new(bytes);
17370        #[allow(clippy::absurd_extreme_comparisons)]
17371        #[allow(unused_comparisons)]
17372        if __tmp.remaining() < Self::ENCODED_LEN {
17373            panic!(
17374                "buffer is too small (need {} bytes, but got {})",
17375                Self::ENCODED_LEN,
17376                __tmp.remaining(),
17377            )
17378        }
17379        __tmp.put_u16_le(self.sequence);
17380        __tmp.put_u8(self.target_system);
17381        __tmp.put_u8(self.target_component);
17382        __tmp.put_u8(self.length);
17383        __tmp.put_u8(self.first_message_offset);
17384        for val in &self.data {
17385            __tmp.put_u8(*val);
17386        }
17387        if matches!(version, MavlinkVersion::V2) {
17388            let len = __tmp.len();
17389            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17390        } else {
17391            __tmp.len()
17392        }
17393    }
17394}
17395#[doc = "id: 120"]
17396#[doc = "Reply to LOG_REQUEST_DATA."]
17397#[derive(Debug, Clone, PartialEq)]
17398#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17399#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17400pub struct LOG_DATA_DATA {
17401    #[doc = "Offset into the log"]
17402    pub ofs: u32,
17403    #[doc = "Log id (from LOG_ENTRY reply)"]
17404    pub id: u16,
17405    #[doc = "Number of bytes (zero for end of log)"]
17406    pub count: u8,
17407    #[doc = "log data"]
17408    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17409    pub data: [u8; 90],
17410}
17411impl LOG_DATA_DATA {
17412    pub const ENCODED_LEN: usize = 97usize;
17413    pub const DEFAULT: Self = Self {
17414        ofs: 0_u32,
17415        id: 0_u16,
17416        count: 0_u8,
17417        data: [0_u8; 90usize],
17418    };
17419    #[cfg(feature = "arbitrary")]
17420    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17421        use arbitrary::{Arbitrary, Unstructured};
17422        let mut buf = [0u8; 1024];
17423        rng.fill_bytes(&mut buf);
17424        let mut unstructured = Unstructured::new(&buf);
17425        Self::arbitrary(&mut unstructured).unwrap_or_default()
17426    }
17427}
17428impl Default for LOG_DATA_DATA {
17429    fn default() -> Self {
17430        Self::DEFAULT.clone()
17431    }
17432}
17433impl MessageData for LOG_DATA_DATA {
17434    type Message = MavMessage;
17435    const ID: u32 = 120u32;
17436    const NAME: &'static str = "LOG_DATA";
17437    const EXTRA_CRC: u8 = 134u8;
17438    const ENCODED_LEN: usize = 97usize;
17439    fn deser(
17440        _version: MavlinkVersion,
17441        __input: &[u8],
17442    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17443        let avail_len = __input.len();
17444        let mut payload_buf = [0; Self::ENCODED_LEN];
17445        let mut buf = if avail_len < Self::ENCODED_LEN {
17446            payload_buf[0..avail_len].copy_from_slice(__input);
17447            Bytes::new(&payload_buf)
17448        } else {
17449            Bytes::new(__input)
17450        };
17451        let mut __struct = Self::default();
17452        __struct.ofs = buf.get_u32_le();
17453        __struct.id = buf.get_u16_le();
17454        __struct.count = buf.get_u8();
17455        for v in &mut __struct.data {
17456            let val = buf.get_u8();
17457            *v = val;
17458        }
17459        Ok(__struct)
17460    }
17461    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17462        let mut __tmp = BytesMut::new(bytes);
17463        #[allow(clippy::absurd_extreme_comparisons)]
17464        #[allow(unused_comparisons)]
17465        if __tmp.remaining() < Self::ENCODED_LEN {
17466            panic!(
17467                "buffer is too small (need {} bytes, but got {})",
17468                Self::ENCODED_LEN,
17469                __tmp.remaining(),
17470            )
17471        }
17472        __tmp.put_u32_le(self.ofs);
17473        __tmp.put_u16_le(self.id);
17474        __tmp.put_u8(self.count);
17475        for val in &self.data {
17476            __tmp.put_u8(*val);
17477        }
17478        if matches!(version, MavlinkVersion::V2) {
17479            let len = __tmp.len();
17480            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17481        } else {
17482            __tmp.len()
17483        }
17484    }
17485}
17486#[doc = "id: 118"]
17487#[doc = "Reply to LOG_REQUEST_LIST."]
17488#[derive(Debug, Clone, PartialEq)]
17489#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17490#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17491pub struct LOG_ENTRY_DATA {
17492    #[doc = "UTC timestamp of log since 1970, or 0 if not available"]
17493    pub time_utc: u32,
17494    #[doc = "Size of the log (may be approximate)"]
17495    pub size: u32,
17496    #[doc = "Log id"]
17497    pub id: u16,
17498    #[doc = "Total number of logs"]
17499    pub num_logs: u16,
17500    #[doc = "High log number"]
17501    pub last_log_num: u16,
17502}
17503impl LOG_ENTRY_DATA {
17504    pub const ENCODED_LEN: usize = 14usize;
17505    pub const DEFAULT: Self = Self {
17506        time_utc: 0_u32,
17507        size: 0_u32,
17508        id: 0_u16,
17509        num_logs: 0_u16,
17510        last_log_num: 0_u16,
17511    };
17512    #[cfg(feature = "arbitrary")]
17513    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17514        use arbitrary::{Arbitrary, Unstructured};
17515        let mut buf = [0u8; 1024];
17516        rng.fill_bytes(&mut buf);
17517        let mut unstructured = Unstructured::new(&buf);
17518        Self::arbitrary(&mut unstructured).unwrap_or_default()
17519    }
17520}
17521impl Default for LOG_ENTRY_DATA {
17522    fn default() -> Self {
17523        Self::DEFAULT.clone()
17524    }
17525}
17526impl MessageData for LOG_ENTRY_DATA {
17527    type Message = MavMessage;
17528    const ID: u32 = 118u32;
17529    const NAME: &'static str = "LOG_ENTRY";
17530    const EXTRA_CRC: u8 = 56u8;
17531    const ENCODED_LEN: usize = 14usize;
17532    fn deser(
17533        _version: MavlinkVersion,
17534        __input: &[u8],
17535    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17536        let avail_len = __input.len();
17537        let mut payload_buf = [0; Self::ENCODED_LEN];
17538        let mut buf = if avail_len < Self::ENCODED_LEN {
17539            payload_buf[0..avail_len].copy_from_slice(__input);
17540            Bytes::new(&payload_buf)
17541        } else {
17542            Bytes::new(__input)
17543        };
17544        let mut __struct = Self::default();
17545        __struct.time_utc = buf.get_u32_le();
17546        __struct.size = buf.get_u32_le();
17547        __struct.id = buf.get_u16_le();
17548        __struct.num_logs = buf.get_u16_le();
17549        __struct.last_log_num = buf.get_u16_le();
17550        Ok(__struct)
17551    }
17552    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17553        let mut __tmp = BytesMut::new(bytes);
17554        #[allow(clippy::absurd_extreme_comparisons)]
17555        #[allow(unused_comparisons)]
17556        if __tmp.remaining() < Self::ENCODED_LEN {
17557            panic!(
17558                "buffer is too small (need {} bytes, but got {})",
17559                Self::ENCODED_LEN,
17560                __tmp.remaining(),
17561            )
17562        }
17563        __tmp.put_u32_le(self.time_utc);
17564        __tmp.put_u32_le(self.size);
17565        __tmp.put_u16_le(self.id);
17566        __tmp.put_u16_le(self.num_logs);
17567        __tmp.put_u16_le(self.last_log_num);
17568        if matches!(version, MavlinkVersion::V2) {
17569            let len = __tmp.len();
17570            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17571        } else {
17572            __tmp.len()
17573        }
17574    }
17575}
17576#[doc = "id: 121"]
17577#[doc = "Erase all logs."]
17578#[derive(Debug, Clone, PartialEq)]
17579#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17580#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17581pub struct LOG_ERASE_DATA {
17582    #[doc = "System ID"]
17583    pub target_system: u8,
17584    #[doc = "Component ID"]
17585    pub target_component: u8,
17586}
17587impl LOG_ERASE_DATA {
17588    pub const ENCODED_LEN: usize = 2usize;
17589    pub const DEFAULT: Self = Self {
17590        target_system: 0_u8,
17591        target_component: 0_u8,
17592    };
17593    #[cfg(feature = "arbitrary")]
17594    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17595        use arbitrary::{Arbitrary, Unstructured};
17596        let mut buf = [0u8; 1024];
17597        rng.fill_bytes(&mut buf);
17598        let mut unstructured = Unstructured::new(&buf);
17599        Self::arbitrary(&mut unstructured).unwrap_or_default()
17600    }
17601}
17602impl Default for LOG_ERASE_DATA {
17603    fn default() -> Self {
17604        Self::DEFAULT.clone()
17605    }
17606}
17607impl MessageData for LOG_ERASE_DATA {
17608    type Message = MavMessage;
17609    const ID: u32 = 121u32;
17610    const NAME: &'static str = "LOG_ERASE";
17611    const EXTRA_CRC: u8 = 237u8;
17612    const ENCODED_LEN: usize = 2usize;
17613    fn deser(
17614        _version: MavlinkVersion,
17615        __input: &[u8],
17616    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17617        let avail_len = __input.len();
17618        let mut payload_buf = [0; Self::ENCODED_LEN];
17619        let mut buf = if avail_len < Self::ENCODED_LEN {
17620            payload_buf[0..avail_len].copy_from_slice(__input);
17621            Bytes::new(&payload_buf)
17622        } else {
17623            Bytes::new(__input)
17624        };
17625        let mut __struct = Self::default();
17626        __struct.target_system = buf.get_u8();
17627        __struct.target_component = buf.get_u8();
17628        Ok(__struct)
17629    }
17630    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17631        let mut __tmp = BytesMut::new(bytes);
17632        #[allow(clippy::absurd_extreme_comparisons)]
17633        #[allow(unused_comparisons)]
17634        if __tmp.remaining() < Self::ENCODED_LEN {
17635            panic!(
17636                "buffer is too small (need {} bytes, but got {})",
17637                Self::ENCODED_LEN,
17638                __tmp.remaining(),
17639            )
17640        }
17641        __tmp.put_u8(self.target_system);
17642        __tmp.put_u8(self.target_component);
17643        if matches!(version, MavlinkVersion::V2) {
17644            let len = __tmp.len();
17645            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17646        } else {
17647            __tmp.len()
17648        }
17649    }
17650}
17651#[doc = "id: 119"]
17652#[doc = "Request a chunk of a log."]
17653#[derive(Debug, Clone, PartialEq)]
17654#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17655#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17656pub struct LOG_REQUEST_DATA_DATA {
17657    #[doc = "Offset into the log"]
17658    pub ofs: u32,
17659    #[doc = "Number of bytes"]
17660    pub count: u32,
17661    #[doc = "Log id (from LOG_ENTRY reply)"]
17662    pub id: u16,
17663    #[doc = "System ID"]
17664    pub target_system: u8,
17665    #[doc = "Component ID"]
17666    pub target_component: u8,
17667}
17668impl LOG_REQUEST_DATA_DATA {
17669    pub const ENCODED_LEN: usize = 12usize;
17670    pub const DEFAULT: Self = Self {
17671        ofs: 0_u32,
17672        count: 0_u32,
17673        id: 0_u16,
17674        target_system: 0_u8,
17675        target_component: 0_u8,
17676    };
17677    #[cfg(feature = "arbitrary")]
17678    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17679        use arbitrary::{Arbitrary, Unstructured};
17680        let mut buf = [0u8; 1024];
17681        rng.fill_bytes(&mut buf);
17682        let mut unstructured = Unstructured::new(&buf);
17683        Self::arbitrary(&mut unstructured).unwrap_or_default()
17684    }
17685}
17686impl Default for LOG_REQUEST_DATA_DATA {
17687    fn default() -> Self {
17688        Self::DEFAULT.clone()
17689    }
17690}
17691impl MessageData for LOG_REQUEST_DATA_DATA {
17692    type Message = MavMessage;
17693    const ID: u32 = 119u32;
17694    const NAME: &'static str = "LOG_REQUEST_DATA";
17695    const EXTRA_CRC: u8 = 116u8;
17696    const ENCODED_LEN: usize = 12usize;
17697    fn deser(
17698        _version: MavlinkVersion,
17699        __input: &[u8],
17700    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17701        let avail_len = __input.len();
17702        let mut payload_buf = [0; Self::ENCODED_LEN];
17703        let mut buf = if avail_len < Self::ENCODED_LEN {
17704            payload_buf[0..avail_len].copy_from_slice(__input);
17705            Bytes::new(&payload_buf)
17706        } else {
17707            Bytes::new(__input)
17708        };
17709        let mut __struct = Self::default();
17710        __struct.ofs = buf.get_u32_le();
17711        __struct.count = buf.get_u32_le();
17712        __struct.id = buf.get_u16_le();
17713        __struct.target_system = buf.get_u8();
17714        __struct.target_component = buf.get_u8();
17715        Ok(__struct)
17716    }
17717    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17718        let mut __tmp = BytesMut::new(bytes);
17719        #[allow(clippy::absurd_extreme_comparisons)]
17720        #[allow(unused_comparisons)]
17721        if __tmp.remaining() < Self::ENCODED_LEN {
17722            panic!(
17723                "buffer is too small (need {} bytes, but got {})",
17724                Self::ENCODED_LEN,
17725                __tmp.remaining(),
17726            )
17727        }
17728        __tmp.put_u32_le(self.ofs);
17729        __tmp.put_u32_le(self.count);
17730        __tmp.put_u16_le(self.id);
17731        __tmp.put_u8(self.target_system);
17732        __tmp.put_u8(self.target_component);
17733        if matches!(version, MavlinkVersion::V2) {
17734            let len = __tmp.len();
17735            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17736        } else {
17737            __tmp.len()
17738        }
17739    }
17740}
17741#[doc = "id: 122"]
17742#[doc = "Stop log transfer and resume normal logging."]
17743#[derive(Debug, Clone, PartialEq)]
17744#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17745#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17746pub struct LOG_REQUEST_END_DATA {
17747    #[doc = "System ID"]
17748    pub target_system: u8,
17749    #[doc = "Component ID"]
17750    pub target_component: u8,
17751}
17752impl LOG_REQUEST_END_DATA {
17753    pub const ENCODED_LEN: usize = 2usize;
17754    pub const DEFAULT: Self = Self {
17755        target_system: 0_u8,
17756        target_component: 0_u8,
17757    };
17758    #[cfg(feature = "arbitrary")]
17759    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17760        use arbitrary::{Arbitrary, Unstructured};
17761        let mut buf = [0u8; 1024];
17762        rng.fill_bytes(&mut buf);
17763        let mut unstructured = Unstructured::new(&buf);
17764        Self::arbitrary(&mut unstructured).unwrap_or_default()
17765    }
17766}
17767impl Default for LOG_REQUEST_END_DATA {
17768    fn default() -> Self {
17769        Self::DEFAULT.clone()
17770    }
17771}
17772impl MessageData for LOG_REQUEST_END_DATA {
17773    type Message = MavMessage;
17774    const ID: u32 = 122u32;
17775    const NAME: &'static str = "LOG_REQUEST_END";
17776    const EXTRA_CRC: u8 = 203u8;
17777    const ENCODED_LEN: usize = 2usize;
17778    fn deser(
17779        _version: MavlinkVersion,
17780        __input: &[u8],
17781    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17782        let avail_len = __input.len();
17783        let mut payload_buf = [0; Self::ENCODED_LEN];
17784        let mut buf = if avail_len < Self::ENCODED_LEN {
17785            payload_buf[0..avail_len].copy_from_slice(__input);
17786            Bytes::new(&payload_buf)
17787        } else {
17788            Bytes::new(__input)
17789        };
17790        let mut __struct = Self::default();
17791        __struct.target_system = buf.get_u8();
17792        __struct.target_component = buf.get_u8();
17793        Ok(__struct)
17794    }
17795    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17796        let mut __tmp = BytesMut::new(bytes);
17797        #[allow(clippy::absurd_extreme_comparisons)]
17798        #[allow(unused_comparisons)]
17799        if __tmp.remaining() < Self::ENCODED_LEN {
17800            panic!(
17801                "buffer is too small (need {} bytes, but got {})",
17802                Self::ENCODED_LEN,
17803                __tmp.remaining(),
17804            )
17805        }
17806        __tmp.put_u8(self.target_system);
17807        __tmp.put_u8(self.target_component);
17808        if matches!(version, MavlinkVersion::V2) {
17809            let len = __tmp.len();
17810            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17811        } else {
17812            __tmp.len()
17813        }
17814    }
17815}
17816#[doc = "id: 117"]
17817#[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
17818#[derive(Debug, Clone, PartialEq)]
17819#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17820#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17821pub struct LOG_REQUEST_LIST_DATA {
17822    #[doc = "First log id (0 for first available)"]
17823    pub start: u16,
17824    #[doc = "Last log id (0xffff for last available)"]
17825    pub end: u16,
17826    #[doc = "System ID"]
17827    pub target_system: u8,
17828    #[doc = "Component ID"]
17829    pub target_component: u8,
17830}
17831impl LOG_REQUEST_LIST_DATA {
17832    pub const ENCODED_LEN: usize = 6usize;
17833    pub const DEFAULT: Self = Self {
17834        start: 0_u16,
17835        end: 0_u16,
17836        target_system: 0_u8,
17837        target_component: 0_u8,
17838    };
17839    #[cfg(feature = "arbitrary")]
17840    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17841        use arbitrary::{Arbitrary, Unstructured};
17842        let mut buf = [0u8; 1024];
17843        rng.fill_bytes(&mut buf);
17844        let mut unstructured = Unstructured::new(&buf);
17845        Self::arbitrary(&mut unstructured).unwrap_or_default()
17846    }
17847}
17848impl Default for LOG_REQUEST_LIST_DATA {
17849    fn default() -> Self {
17850        Self::DEFAULT.clone()
17851    }
17852}
17853impl MessageData for LOG_REQUEST_LIST_DATA {
17854    type Message = MavMessage;
17855    const ID: u32 = 117u32;
17856    const NAME: &'static str = "LOG_REQUEST_LIST";
17857    const EXTRA_CRC: u8 = 128u8;
17858    const ENCODED_LEN: usize = 6usize;
17859    fn deser(
17860        _version: MavlinkVersion,
17861        __input: &[u8],
17862    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17863        let avail_len = __input.len();
17864        let mut payload_buf = [0; Self::ENCODED_LEN];
17865        let mut buf = if avail_len < Self::ENCODED_LEN {
17866            payload_buf[0..avail_len].copy_from_slice(__input);
17867            Bytes::new(&payload_buf)
17868        } else {
17869            Bytes::new(__input)
17870        };
17871        let mut __struct = Self::default();
17872        __struct.start = buf.get_u16_le();
17873        __struct.end = buf.get_u16_le();
17874        __struct.target_system = buf.get_u8();
17875        __struct.target_component = buf.get_u8();
17876        Ok(__struct)
17877    }
17878    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17879        let mut __tmp = BytesMut::new(bytes);
17880        #[allow(clippy::absurd_extreme_comparisons)]
17881        #[allow(unused_comparisons)]
17882        if __tmp.remaining() < Self::ENCODED_LEN {
17883            panic!(
17884                "buffer is too small (need {} bytes, but got {})",
17885                Self::ENCODED_LEN,
17886                __tmp.remaining(),
17887            )
17888        }
17889        __tmp.put_u16_le(self.start);
17890        __tmp.put_u16_le(self.end);
17891        __tmp.put_u8(self.target_system);
17892        __tmp.put_u8(self.target_component);
17893        if matches!(version, MavlinkVersion::V2) {
17894            let len = __tmp.len();
17895            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17896        } else {
17897            __tmp.len()
17898        }
17899    }
17900}
17901#[doc = "id: 192"]
17902#[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
17903#[derive(Debug, Clone, PartialEq)]
17904#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17905#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17906pub struct MAG_CAL_REPORT_DATA {
17907    #[doc = "RMS milligauss residuals."]
17908    pub fitness: f32,
17909    #[doc = "X offset."]
17910    pub ofs_x: f32,
17911    #[doc = "Y offset."]
17912    pub ofs_y: f32,
17913    #[doc = "Z offset."]
17914    pub ofs_z: f32,
17915    #[doc = "X diagonal (matrix 11)."]
17916    pub diag_x: f32,
17917    #[doc = "Y diagonal (matrix 22)."]
17918    pub diag_y: f32,
17919    #[doc = "Z diagonal (matrix 33)."]
17920    pub diag_z: f32,
17921    #[doc = "X off-diagonal (matrix 12 and 21)."]
17922    pub offdiag_x: f32,
17923    #[doc = "Y off-diagonal (matrix 13 and 31)."]
17924    pub offdiag_y: f32,
17925    #[doc = "Z off-diagonal (matrix 32 and 23)."]
17926    pub offdiag_z: f32,
17927    #[doc = "Compass being calibrated."]
17928    pub compass_id: u8,
17929    #[doc = "Bitmask of compasses being calibrated."]
17930    pub cal_mask: u8,
17931    #[doc = "Calibration Status."]
17932    pub cal_status: MagCalStatus,
17933    #[doc = "0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters."]
17934    pub autosaved: u8,
17935    #[doc = "Confidence in orientation (higher is better)."]
17936    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17937    pub orientation_confidence: f32,
17938    #[doc = "orientation before calibration."]
17939    #[cfg_attr(feature = "serde", serde(default))]
17940    pub old_orientation: MavSensorOrientation,
17941    #[doc = "orientation after calibration."]
17942    #[cfg_attr(feature = "serde", serde(default))]
17943    pub new_orientation: MavSensorOrientation,
17944    #[doc = "field radius correction factor"]
17945    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17946    pub scale_factor: f32,
17947}
17948impl MAG_CAL_REPORT_DATA {
17949    pub const ENCODED_LEN: usize = 54usize;
17950    pub const DEFAULT: Self = Self {
17951        fitness: 0.0_f32,
17952        ofs_x: 0.0_f32,
17953        ofs_y: 0.0_f32,
17954        ofs_z: 0.0_f32,
17955        diag_x: 0.0_f32,
17956        diag_y: 0.0_f32,
17957        diag_z: 0.0_f32,
17958        offdiag_x: 0.0_f32,
17959        offdiag_y: 0.0_f32,
17960        offdiag_z: 0.0_f32,
17961        compass_id: 0_u8,
17962        cal_mask: 0_u8,
17963        cal_status: MagCalStatus::DEFAULT,
17964        autosaved: 0_u8,
17965        orientation_confidence: 0.0_f32,
17966        old_orientation: MavSensorOrientation::DEFAULT,
17967        new_orientation: MavSensorOrientation::DEFAULT,
17968        scale_factor: 0.0_f32,
17969    };
17970    #[cfg(feature = "arbitrary")]
17971    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17972        use arbitrary::{Arbitrary, Unstructured};
17973        let mut buf = [0u8; 1024];
17974        rng.fill_bytes(&mut buf);
17975        let mut unstructured = Unstructured::new(&buf);
17976        Self::arbitrary(&mut unstructured).unwrap_or_default()
17977    }
17978}
17979impl Default for MAG_CAL_REPORT_DATA {
17980    fn default() -> Self {
17981        Self::DEFAULT.clone()
17982    }
17983}
17984impl MessageData for MAG_CAL_REPORT_DATA {
17985    type Message = MavMessage;
17986    const ID: u32 = 192u32;
17987    const NAME: &'static str = "MAG_CAL_REPORT";
17988    const EXTRA_CRC: u8 = 36u8;
17989    const ENCODED_LEN: usize = 54usize;
17990    fn deser(
17991        _version: MavlinkVersion,
17992        __input: &[u8],
17993    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17994        let avail_len = __input.len();
17995        let mut payload_buf = [0; Self::ENCODED_LEN];
17996        let mut buf = if avail_len < Self::ENCODED_LEN {
17997            payload_buf[0..avail_len].copy_from_slice(__input);
17998            Bytes::new(&payload_buf)
17999        } else {
18000            Bytes::new(__input)
18001        };
18002        let mut __struct = Self::default();
18003        __struct.fitness = buf.get_f32_le();
18004        __struct.ofs_x = buf.get_f32_le();
18005        __struct.ofs_y = buf.get_f32_le();
18006        __struct.ofs_z = buf.get_f32_le();
18007        __struct.diag_x = buf.get_f32_le();
18008        __struct.diag_y = buf.get_f32_le();
18009        __struct.diag_z = buf.get_f32_le();
18010        __struct.offdiag_x = buf.get_f32_le();
18011        __struct.offdiag_y = buf.get_f32_le();
18012        __struct.offdiag_z = buf.get_f32_le();
18013        __struct.compass_id = buf.get_u8();
18014        __struct.cal_mask = buf.get_u8();
18015        let tmp = buf.get_u8();
18016        __struct.cal_status =
18017            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18018                enum_type: "MagCalStatus",
18019                value: tmp as u32,
18020            })?;
18021        __struct.autosaved = buf.get_u8();
18022        __struct.orientation_confidence = buf.get_f32_le();
18023        let tmp = buf.get_u8();
18024        __struct.old_orientation =
18025            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18026                enum_type: "MavSensorOrientation",
18027                value: tmp as u32,
18028            })?;
18029        let tmp = buf.get_u8();
18030        __struct.new_orientation =
18031            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18032                enum_type: "MavSensorOrientation",
18033                value: tmp as u32,
18034            })?;
18035        __struct.scale_factor = buf.get_f32_le();
18036        Ok(__struct)
18037    }
18038    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18039        let mut __tmp = BytesMut::new(bytes);
18040        #[allow(clippy::absurd_extreme_comparisons)]
18041        #[allow(unused_comparisons)]
18042        if __tmp.remaining() < Self::ENCODED_LEN {
18043            panic!(
18044                "buffer is too small (need {} bytes, but got {})",
18045                Self::ENCODED_LEN,
18046                __tmp.remaining(),
18047            )
18048        }
18049        __tmp.put_f32_le(self.fitness);
18050        __tmp.put_f32_le(self.ofs_x);
18051        __tmp.put_f32_le(self.ofs_y);
18052        __tmp.put_f32_le(self.ofs_z);
18053        __tmp.put_f32_le(self.diag_x);
18054        __tmp.put_f32_le(self.diag_y);
18055        __tmp.put_f32_le(self.diag_z);
18056        __tmp.put_f32_le(self.offdiag_x);
18057        __tmp.put_f32_le(self.offdiag_y);
18058        __tmp.put_f32_le(self.offdiag_z);
18059        __tmp.put_u8(self.compass_id);
18060        __tmp.put_u8(self.cal_mask);
18061        __tmp.put_u8(self.cal_status as u8);
18062        __tmp.put_u8(self.autosaved);
18063        __tmp.put_f32_le(self.orientation_confidence);
18064        __tmp.put_u8(self.old_orientation as u8);
18065        __tmp.put_u8(self.new_orientation as u8);
18066        __tmp.put_f32_le(self.scale_factor);
18067        if matches!(version, MavlinkVersion::V2) {
18068            let len = __tmp.len();
18069            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18070        } else {
18071            __tmp.len()
18072        }
18073    }
18074}
18075#[doc = "id: 69"]
18076#[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
18077#[derive(Debug, Clone, PartialEq)]
18078#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18079#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18080pub struct MANUAL_CONTROL_DATA {
18081    #[doc = "X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle."]
18082    pub x: i16,
18083    #[doc = "Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle."]
18084    pub y: i16,
18085    #[doc = "Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust."]
18086    pub z: i16,
18087    #[doc = "R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle."]
18088    pub r: i16,
18089    #[doc = "A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1."]
18090    pub buttons: u16,
18091    #[doc = "The system to be controlled."]
18092    pub target: u8,
18093    #[doc = "A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16."]
18094    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18095    pub buttons2: u16,
18096    #[doc = "Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6"]
18097    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18098    pub enabled_extensions: u8,
18099    #[doc = "Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid."]
18100    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18101    pub s: i16,
18102    #[doc = "Roll-only-axis, normalized to the range [-1000,1000]. Generally corresponds to roll on vehicles with additional degrees of freedom. Valid if bit 1 of enabled_extensions field is set. Set to 0 if invalid."]
18103    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18104    pub t: i16,
18105    #[doc = "Aux continuous input field 1. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 2 of enabled_extensions field is set. 0 if bit 2 is unset."]
18106    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18107    pub aux1: i16,
18108    #[doc = "Aux continuous input field 2. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 3 of enabled_extensions field is set. 0 if bit 3 is unset."]
18109    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18110    pub aux2: i16,
18111    #[doc = "Aux continuous input field 3. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 4 of enabled_extensions field is set. 0 if bit 4 is unset."]
18112    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18113    pub aux3: i16,
18114    #[doc = "Aux continuous input field 4. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 5 of enabled_extensions field is set. 0 if bit 5 is unset."]
18115    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18116    pub aux4: i16,
18117    #[doc = "Aux continuous input field 5. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 6 of enabled_extensions field is set. 0 if bit 6 is unset."]
18118    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18119    pub aux5: i16,
18120    #[doc = "Aux continuous input field 6. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 7 of enabled_extensions field is set. 0 if bit 7 is unset."]
18121    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18122    pub aux6: i16,
18123}
18124impl MANUAL_CONTROL_DATA {
18125    pub const ENCODED_LEN: usize = 30usize;
18126    pub const DEFAULT: Self = Self {
18127        x: 0_i16,
18128        y: 0_i16,
18129        z: 0_i16,
18130        r: 0_i16,
18131        buttons: 0_u16,
18132        target: 0_u8,
18133        buttons2: 0_u16,
18134        enabled_extensions: 0_u8,
18135        s: 0_i16,
18136        t: 0_i16,
18137        aux1: 0_i16,
18138        aux2: 0_i16,
18139        aux3: 0_i16,
18140        aux4: 0_i16,
18141        aux5: 0_i16,
18142        aux6: 0_i16,
18143    };
18144    #[cfg(feature = "arbitrary")]
18145    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18146        use arbitrary::{Arbitrary, Unstructured};
18147        let mut buf = [0u8; 1024];
18148        rng.fill_bytes(&mut buf);
18149        let mut unstructured = Unstructured::new(&buf);
18150        Self::arbitrary(&mut unstructured).unwrap_or_default()
18151    }
18152}
18153impl Default for MANUAL_CONTROL_DATA {
18154    fn default() -> Self {
18155        Self::DEFAULT.clone()
18156    }
18157}
18158impl MessageData for MANUAL_CONTROL_DATA {
18159    type Message = MavMessage;
18160    const ID: u32 = 69u32;
18161    const NAME: &'static str = "MANUAL_CONTROL";
18162    const EXTRA_CRC: u8 = 243u8;
18163    const ENCODED_LEN: usize = 30usize;
18164    fn deser(
18165        _version: MavlinkVersion,
18166        __input: &[u8],
18167    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18168        let avail_len = __input.len();
18169        let mut payload_buf = [0; Self::ENCODED_LEN];
18170        let mut buf = if avail_len < Self::ENCODED_LEN {
18171            payload_buf[0..avail_len].copy_from_slice(__input);
18172            Bytes::new(&payload_buf)
18173        } else {
18174            Bytes::new(__input)
18175        };
18176        let mut __struct = Self::default();
18177        __struct.x = buf.get_i16_le();
18178        __struct.y = buf.get_i16_le();
18179        __struct.z = buf.get_i16_le();
18180        __struct.r = buf.get_i16_le();
18181        __struct.buttons = buf.get_u16_le();
18182        __struct.target = buf.get_u8();
18183        __struct.buttons2 = buf.get_u16_le();
18184        __struct.enabled_extensions = buf.get_u8();
18185        __struct.s = buf.get_i16_le();
18186        __struct.t = buf.get_i16_le();
18187        __struct.aux1 = buf.get_i16_le();
18188        __struct.aux2 = buf.get_i16_le();
18189        __struct.aux3 = buf.get_i16_le();
18190        __struct.aux4 = buf.get_i16_le();
18191        __struct.aux5 = buf.get_i16_le();
18192        __struct.aux6 = buf.get_i16_le();
18193        Ok(__struct)
18194    }
18195    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18196        let mut __tmp = BytesMut::new(bytes);
18197        #[allow(clippy::absurd_extreme_comparisons)]
18198        #[allow(unused_comparisons)]
18199        if __tmp.remaining() < Self::ENCODED_LEN {
18200            panic!(
18201                "buffer is too small (need {} bytes, but got {})",
18202                Self::ENCODED_LEN,
18203                __tmp.remaining(),
18204            )
18205        }
18206        __tmp.put_i16_le(self.x);
18207        __tmp.put_i16_le(self.y);
18208        __tmp.put_i16_le(self.z);
18209        __tmp.put_i16_le(self.r);
18210        __tmp.put_u16_le(self.buttons);
18211        __tmp.put_u8(self.target);
18212        __tmp.put_u16_le(self.buttons2);
18213        __tmp.put_u8(self.enabled_extensions);
18214        __tmp.put_i16_le(self.s);
18215        __tmp.put_i16_le(self.t);
18216        __tmp.put_i16_le(self.aux1);
18217        __tmp.put_i16_le(self.aux2);
18218        __tmp.put_i16_le(self.aux3);
18219        __tmp.put_i16_le(self.aux4);
18220        __tmp.put_i16_le(self.aux5);
18221        __tmp.put_i16_le(self.aux6);
18222        if matches!(version, MavlinkVersion::V2) {
18223            let len = __tmp.len();
18224            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18225        } else {
18226            __tmp.len()
18227        }
18228    }
18229}
18230#[doc = "id: 81"]
18231#[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
18232#[derive(Debug, Clone, PartialEq)]
18233#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18234#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18235pub struct MANUAL_SETPOINT_DATA {
18236    #[doc = "Timestamp (time since system boot)."]
18237    pub time_boot_ms: u32,
18238    #[doc = "Desired roll rate"]
18239    pub roll: f32,
18240    #[doc = "Desired pitch rate"]
18241    pub pitch: f32,
18242    #[doc = "Desired yaw rate"]
18243    pub yaw: f32,
18244    #[doc = "Collective thrust, normalized to 0 .. 1"]
18245    pub thrust: f32,
18246    #[doc = "Flight mode switch position, 0.. 255"]
18247    pub mode_switch: u8,
18248    #[doc = "Override mode switch position, 0.. 255"]
18249    pub manual_override_switch: u8,
18250}
18251impl MANUAL_SETPOINT_DATA {
18252    pub const ENCODED_LEN: usize = 22usize;
18253    pub const DEFAULT: Self = Self {
18254        time_boot_ms: 0_u32,
18255        roll: 0.0_f32,
18256        pitch: 0.0_f32,
18257        yaw: 0.0_f32,
18258        thrust: 0.0_f32,
18259        mode_switch: 0_u8,
18260        manual_override_switch: 0_u8,
18261    };
18262    #[cfg(feature = "arbitrary")]
18263    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18264        use arbitrary::{Arbitrary, Unstructured};
18265        let mut buf = [0u8; 1024];
18266        rng.fill_bytes(&mut buf);
18267        let mut unstructured = Unstructured::new(&buf);
18268        Self::arbitrary(&mut unstructured).unwrap_or_default()
18269    }
18270}
18271impl Default for MANUAL_SETPOINT_DATA {
18272    fn default() -> Self {
18273        Self::DEFAULT.clone()
18274    }
18275}
18276impl MessageData for MANUAL_SETPOINT_DATA {
18277    type Message = MavMessage;
18278    const ID: u32 = 81u32;
18279    const NAME: &'static str = "MANUAL_SETPOINT";
18280    const EXTRA_CRC: u8 = 106u8;
18281    const ENCODED_LEN: usize = 22usize;
18282    fn deser(
18283        _version: MavlinkVersion,
18284        __input: &[u8],
18285    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18286        let avail_len = __input.len();
18287        let mut payload_buf = [0; Self::ENCODED_LEN];
18288        let mut buf = if avail_len < Self::ENCODED_LEN {
18289            payload_buf[0..avail_len].copy_from_slice(__input);
18290            Bytes::new(&payload_buf)
18291        } else {
18292            Bytes::new(__input)
18293        };
18294        let mut __struct = Self::default();
18295        __struct.time_boot_ms = buf.get_u32_le();
18296        __struct.roll = buf.get_f32_le();
18297        __struct.pitch = buf.get_f32_le();
18298        __struct.yaw = buf.get_f32_le();
18299        __struct.thrust = buf.get_f32_le();
18300        __struct.mode_switch = buf.get_u8();
18301        __struct.manual_override_switch = buf.get_u8();
18302        Ok(__struct)
18303    }
18304    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18305        let mut __tmp = BytesMut::new(bytes);
18306        #[allow(clippy::absurd_extreme_comparisons)]
18307        #[allow(unused_comparisons)]
18308        if __tmp.remaining() < Self::ENCODED_LEN {
18309            panic!(
18310                "buffer is too small (need {} bytes, but got {})",
18311                Self::ENCODED_LEN,
18312                __tmp.remaining(),
18313            )
18314        }
18315        __tmp.put_u32_le(self.time_boot_ms);
18316        __tmp.put_f32_le(self.roll);
18317        __tmp.put_f32_le(self.pitch);
18318        __tmp.put_f32_le(self.yaw);
18319        __tmp.put_f32_le(self.thrust);
18320        __tmp.put_u8(self.mode_switch);
18321        __tmp.put_u8(self.manual_override_switch);
18322        if matches!(version, MavlinkVersion::V2) {
18323            let len = __tmp.len();
18324            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18325        } else {
18326            __tmp.len()
18327        }
18328    }
18329}
18330#[doc = "id: 249"]
18331#[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
18332#[derive(Debug, Clone, PartialEq)]
18333#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18334#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18335pub struct MEMORY_VECT_DATA {
18336    #[doc = "Starting address of the debug variables"]
18337    pub address: u16,
18338    #[doc = "Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below"]
18339    pub ver: u8,
18340    #[doc = "Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14"]
18341    pub mavtype: u8,
18342    #[doc = "Memory contents at specified address"]
18343    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18344    pub value: [i8; 32],
18345}
18346impl MEMORY_VECT_DATA {
18347    pub const ENCODED_LEN: usize = 36usize;
18348    pub const DEFAULT: Self = Self {
18349        address: 0_u16,
18350        ver: 0_u8,
18351        mavtype: 0_u8,
18352        value: [0_i8; 32usize],
18353    };
18354    #[cfg(feature = "arbitrary")]
18355    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18356        use arbitrary::{Arbitrary, Unstructured};
18357        let mut buf = [0u8; 1024];
18358        rng.fill_bytes(&mut buf);
18359        let mut unstructured = Unstructured::new(&buf);
18360        Self::arbitrary(&mut unstructured).unwrap_or_default()
18361    }
18362}
18363impl Default for MEMORY_VECT_DATA {
18364    fn default() -> Self {
18365        Self::DEFAULT.clone()
18366    }
18367}
18368impl MessageData for MEMORY_VECT_DATA {
18369    type Message = MavMessage;
18370    const ID: u32 = 249u32;
18371    const NAME: &'static str = "MEMORY_VECT";
18372    const EXTRA_CRC: u8 = 204u8;
18373    const ENCODED_LEN: usize = 36usize;
18374    fn deser(
18375        _version: MavlinkVersion,
18376        __input: &[u8],
18377    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18378        let avail_len = __input.len();
18379        let mut payload_buf = [0; Self::ENCODED_LEN];
18380        let mut buf = if avail_len < Self::ENCODED_LEN {
18381            payload_buf[0..avail_len].copy_from_slice(__input);
18382            Bytes::new(&payload_buf)
18383        } else {
18384            Bytes::new(__input)
18385        };
18386        let mut __struct = Self::default();
18387        __struct.address = buf.get_u16_le();
18388        __struct.ver = buf.get_u8();
18389        __struct.mavtype = buf.get_u8();
18390        for v in &mut __struct.value {
18391            let val = buf.get_i8();
18392            *v = val;
18393        }
18394        Ok(__struct)
18395    }
18396    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18397        let mut __tmp = BytesMut::new(bytes);
18398        #[allow(clippy::absurd_extreme_comparisons)]
18399        #[allow(unused_comparisons)]
18400        if __tmp.remaining() < Self::ENCODED_LEN {
18401            panic!(
18402                "buffer is too small (need {} bytes, but got {})",
18403                Self::ENCODED_LEN,
18404                __tmp.remaining(),
18405            )
18406        }
18407        __tmp.put_u16_le(self.address);
18408        __tmp.put_u8(self.ver);
18409        __tmp.put_u8(self.mavtype);
18410        for val in &self.value {
18411            __tmp.put_i8(*val);
18412        }
18413        if matches!(version, MavlinkVersion::V2) {
18414            let len = __tmp.len();
18415            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18416        } else {
18417            __tmp.len()
18418        }
18419    }
18420}
18421#[doc = "id: 244"]
18422#[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
18423#[derive(Debug, Clone, PartialEq)]
18424#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18425#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18426pub struct MESSAGE_INTERVAL_DATA {
18427    #[doc = "0 indicates the interval at which it is sent."]
18428    pub interval_us: i32,
18429    #[doc = "The ID of the requested MAVLink message. v1.0 is limited to 254 messages."]
18430    pub message_id: u16,
18431}
18432impl MESSAGE_INTERVAL_DATA {
18433    pub const ENCODED_LEN: usize = 6usize;
18434    pub const DEFAULT: Self = Self {
18435        interval_us: 0_i32,
18436        message_id: 0_u16,
18437    };
18438    #[cfg(feature = "arbitrary")]
18439    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18440        use arbitrary::{Arbitrary, Unstructured};
18441        let mut buf = [0u8; 1024];
18442        rng.fill_bytes(&mut buf);
18443        let mut unstructured = Unstructured::new(&buf);
18444        Self::arbitrary(&mut unstructured).unwrap_or_default()
18445    }
18446}
18447impl Default for MESSAGE_INTERVAL_DATA {
18448    fn default() -> Self {
18449        Self::DEFAULT.clone()
18450    }
18451}
18452impl MessageData for MESSAGE_INTERVAL_DATA {
18453    type Message = MavMessage;
18454    const ID: u32 = 244u32;
18455    const NAME: &'static str = "MESSAGE_INTERVAL";
18456    const EXTRA_CRC: u8 = 95u8;
18457    const ENCODED_LEN: usize = 6usize;
18458    fn deser(
18459        _version: MavlinkVersion,
18460        __input: &[u8],
18461    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18462        let avail_len = __input.len();
18463        let mut payload_buf = [0; Self::ENCODED_LEN];
18464        let mut buf = if avail_len < Self::ENCODED_LEN {
18465            payload_buf[0..avail_len].copy_from_slice(__input);
18466            Bytes::new(&payload_buf)
18467        } else {
18468            Bytes::new(__input)
18469        };
18470        let mut __struct = Self::default();
18471        __struct.interval_us = buf.get_i32_le();
18472        __struct.message_id = buf.get_u16_le();
18473        Ok(__struct)
18474    }
18475    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18476        let mut __tmp = BytesMut::new(bytes);
18477        #[allow(clippy::absurd_extreme_comparisons)]
18478        #[allow(unused_comparisons)]
18479        if __tmp.remaining() < Self::ENCODED_LEN {
18480            panic!(
18481                "buffer is too small (need {} bytes, but got {})",
18482                Self::ENCODED_LEN,
18483                __tmp.remaining(),
18484            )
18485        }
18486        __tmp.put_i32_le(self.interval_us);
18487        __tmp.put_u16_le(self.message_id);
18488        if matches!(version, MavlinkVersion::V2) {
18489            let len = __tmp.len();
18490            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18491        } else {
18492            __tmp.len()
18493        }
18494    }
18495}
18496#[doc = "id: 47"]
18497#[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
18498#[derive(Debug, Clone, PartialEq)]
18499#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18500#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18501pub struct MISSION_ACK_DATA {
18502    #[doc = "System ID"]
18503    pub target_system: u8,
18504    #[doc = "Component ID"]
18505    pub target_component: u8,
18506    #[doc = "Mission result."]
18507    pub mavtype: MavMissionResult,
18508    #[doc = "Mission type."]
18509    #[cfg_attr(feature = "serde", serde(default))]
18510    pub mission_type: MavMissionType,
18511    #[doc = "Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle).         The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS.         The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique).         0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT).         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded."]
18512    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18513    pub opaque_id: u32,
18514}
18515impl MISSION_ACK_DATA {
18516    pub const ENCODED_LEN: usize = 8usize;
18517    pub const DEFAULT: Self = Self {
18518        target_system: 0_u8,
18519        target_component: 0_u8,
18520        mavtype: MavMissionResult::DEFAULT,
18521        mission_type: MavMissionType::DEFAULT,
18522        opaque_id: 0_u32,
18523    };
18524    #[cfg(feature = "arbitrary")]
18525    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18526        use arbitrary::{Arbitrary, Unstructured};
18527        let mut buf = [0u8; 1024];
18528        rng.fill_bytes(&mut buf);
18529        let mut unstructured = Unstructured::new(&buf);
18530        Self::arbitrary(&mut unstructured).unwrap_or_default()
18531    }
18532}
18533impl Default for MISSION_ACK_DATA {
18534    fn default() -> Self {
18535        Self::DEFAULT.clone()
18536    }
18537}
18538impl MessageData for MISSION_ACK_DATA {
18539    type Message = MavMessage;
18540    const ID: u32 = 47u32;
18541    const NAME: &'static str = "MISSION_ACK";
18542    const EXTRA_CRC: u8 = 153u8;
18543    const ENCODED_LEN: usize = 8usize;
18544    fn deser(
18545        _version: MavlinkVersion,
18546        __input: &[u8],
18547    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18548        let avail_len = __input.len();
18549        let mut payload_buf = [0; Self::ENCODED_LEN];
18550        let mut buf = if avail_len < Self::ENCODED_LEN {
18551            payload_buf[0..avail_len].copy_from_slice(__input);
18552            Bytes::new(&payload_buf)
18553        } else {
18554            Bytes::new(__input)
18555        };
18556        let mut __struct = Self::default();
18557        __struct.target_system = buf.get_u8();
18558        __struct.target_component = buf.get_u8();
18559        let tmp = buf.get_u8();
18560        __struct.mavtype =
18561            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18562                enum_type: "MavMissionResult",
18563                value: tmp as u32,
18564            })?;
18565        let tmp = buf.get_u8();
18566        __struct.mission_type =
18567            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18568                enum_type: "MavMissionType",
18569                value: tmp as u32,
18570            })?;
18571        __struct.opaque_id = buf.get_u32_le();
18572        Ok(__struct)
18573    }
18574    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18575        let mut __tmp = BytesMut::new(bytes);
18576        #[allow(clippy::absurd_extreme_comparisons)]
18577        #[allow(unused_comparisons)]
18578        if __tmp.remaining() < Self::ENCODED_LEN {
18579            panic!(
18580                "buffer is too small (need {} bytes, but got {})",
18581                Self::ENCODED_LEN,
18582                __tmp.remaining(),
18583            )
18584        }
18585        __tmp.put_u8(self.target_system);
18586        __tmp.put_u8(self.target_component);
18587        __tmp.put_u8(self.mavtype as u8);
18588        __tmp.put_u8(self.mission_type as u8);
18589        __tmp.put_u32_le(self.opaque_id);
18590        if matches!(version, MavlinkVersion::V2) {
18591            let len = __tmp.len();
18592            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18593        } else {
18594            __tmp.len()
18595        }
18596    }
18597}
18598#[doc = "id: 45"]
18599#[doc = "Delete all mission items at once."]
18600#[derive(Debug, Clone, PartialEq)]
18601#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18602#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18603pub struct MISSION_CLEAR_ALL_DATA {
18604    #[doc = "System ID"]
18605    pub target_system: u8,
18606    #[doc = "Component ID"]
18607    pub target_component: u8,
18608    #[doc = "Mission type."]
18609    #[cfg_attr(feature = "serde", serde(default))]
18610    pub mission_type: MavMissionType,
18611}
18612impl MISSION_CLEAR_ALL_DATA {
18613    pub const ENCODED_LEN: usize = 3usize;
18614    pub const DEFAULT: Self = Self {
18615        target_system: 0_u8,
18616        target_component: 0_u8,
18617        mission_type: MavMissionType::DEFAULT,
18618    };
18619    #[cfg(feature = "arbitrary")]
18620    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18621        use arbitrary::{Arbitrary, Unstructured};
18622        let mut buf = [0u8; 1024];
18623        rng.fill_bytes(&mut buf);
18624        let mut unstructured = Unstructured::new(&buf);
18625        Self::arbitrary(&mut unstructured).unwrap_or_default()
18626    }
18627}
18628impl Default for MISSION_CLEAR_ALL_DATA {
18629    fn default() -> Self {
18630        Self::DEFAULT.clone()
18631    }
18632}
18633impl MessageData for MISSION_CLEAR_ALL_DATA {
18634    type Message = MavMessage;
18635    const ID: u32 = 45u32;
18636    const NAME: &'static str = "MISSION_CLEAR_ALL";
18637    const EXTRA_CRC: u8 = 232u8;
18638    const ENCODED_LEN: usize = 3usize;
18639    fn deser(
18640        _version: MavlinkVersion,
18641        __input: &[u8],
18642    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18643        let avail_len = __input.len();
18644        let mut payload_buf = [0; Self::ENCODED_LEN];
18645        let mut buf = if avail_len < Self::ENCODED_LEN {
18646            payload_buf[0..avail_len].copy_from_slice(__input);
18647            Bytes::new(&payload_buf)
18648        } else {
18649            Bytes::new(__input)
18650        };
18651        let mut __struct = Self::default();
18652        __struct.target_system = buf.get_u8();
18653        __struct.target_component = buf.get_u8();
18654        let tmp = buf.get_u8();
18655        __struct.mission_type =
18656            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18657                enum_type: "MavMissionType",
18658                value: tmp as u32,
18659            })?;
18660        Ok(__struct)
18661    }
18662    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18663        let mut __tmp = BytesMut::new(bytes);
18664        #[allow(clippy::absurd_extreme_comparisons)]
18665        #[allow(unused_comparisons)]
18666        if __tmp.remaining() < Self::ENCODED_LEN {
18667            panic!(
18668                "buffer is too small (need {} bytes, but got {})",
18669                Self::ENCODED_LEN,
18670                __tmp.remaining(),
18671            )
18672        }
18673        __tmp.put_u8(self.target_system);
18674        __tmp.put_u8(self.target_component);
18675        __tmp.put_u8(self.mission_type as u8);
18676        if matches!(version, MavlinkVersion::V2) {
18677            let len = __tmp.len();
18678            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18679        } else {
18680            __tmp.len()
18681        }
18682    }
18683}
18684#[doc = "id: 44"]
18685#[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
18686#[derive(Debug, Clone, PartialEq)]
18687#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18688#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18689pub struct MISSION_COUNT_DATA {
18690    #[doc = "Number of mission items in the sequence"]
18691    pub count: u16,
18692    #[doc = "System ID"]
18693    pub target_system: u8,
18694    #[doc = "Component ID"]
18695    pub target_component: u8,
18696    #[doc = "Mission type."]
18697    #[cfg_attr(feature = "serde", serde(default))]
18698    pub mission_type: MavMissionType,
18699    #[doc = "Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle).         This field is used when downloading a plan from a vehicle to a GCS.         0 on upload to the vehicle from GCS.         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded.         The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK)."]
18700    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18701    pub opaque_id: u32,
18702}
18703impl MISSION_COUNT_DATA {
18704    pub const ENCODED_LEN: usize = 9usize;
18705    pub const DEFAULT: Self = Self {
18706        count: 0_u16,
18707        target_system: 0_u8,
18708        target_component: 0_u8,
18709        mission_type: MavMissionType::DEFAULT,
18710        opaque_id: 0_u32,
18711    };
18712    #[cfg(feature = "arbitrary")]
18713    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18714        use arbitrary::{Arbitrary, Unstructured};
18715        let mut buf = [0u8; 1024];
18716        rng.fill_bytes(&mut buf);
18717        let mut unstructured = Unstructured::new(&buf);
18718        Self::arbitrary(&mut unstructured).unwrap_or_default()
18719    }
18720}
18721impl Default for MISSION_COUNT_DATA {
18722    fn default() -> Self {
18723        Self::DEFAULT.clone()
18724    }
18725}
18726impl MessageData for MISSION_COUNT_DATA {
18727    type Message = MavMessage;
18728    const ID: u32 = 44u32;
18729    const NAME: &'static str = "MISSION_COUNT";
18730    const EXTRA_CRC: u8 = 221u8;
18731    const ENCODED_LEN: usize = 9usize;
18732    fn deser(
18733        _version: MavlinkVersion,
18734        __input: &[u8],
18735    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18736        let avail_len = __input.len();
18737        let mut payload_buf = [0; Self::ENCODED_LEN];
18738        let mut buf = if avail_len < Self::ENCODED_LEN {
18739            payload_buf[0..avail_len].copy_from_slice(__input);
18740            Bytes::new(&payload_buf)
18741        } else {
18742            Bytes::new(__input)
18743        };
18744        let mut __struct = Self::default();
18745        __struct.count = buf.get_u16_le();
18746        __struct.target_system = buf.get_u8();
18747        __struct.target_component = buf.get_u8();
18748        let tmp = buf.get_u8();
18749        __struct.mission_type =
18750            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18751                enum_type: "MavMissionType",
18752                value: tmp as u32,
18753            })?;
18754        __struct.opaque_id = buf.get_u32_le();
18755        Ok(__struct)
18756    }
18757    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18758        let mut __tmp = BytesMut::new(bytes);
18759        #[allow(clippy::absurd_extreme_comparisons)]
18760        #[allow(unused_comparisons)]
18761        if __tmp.remaining() < Self::ENCODED_LEN {
18762            panic!(
18763                "buffer is too small (need {} bytes, but got {})",
18764                Self::ENCODED_LEN,
18765                __tmp.remaining(),
18766            )
18767        }
18768        __tmp.put_u16_le(self.count);
18769        __tmp.put_u8(self.target_system);
18770        __tmp.put_u8(self.target_component);
18771        __tmp.put_u8(self.mission_type as u8);
18772        __tmp.put_u32_le(self.opaque_id);
18773        if matches!(version, MavlinkVersion::V2) {
18774            let len = __tmp.len();
18775            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18776        } else {
18777            __tmp.len()
18778        }
18779    }
18780}
18781#[doc = "id: 42"]
18782#[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
18783#[derive(Debug, Clone, PartialEq)]
18784#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18785#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18786pub struct MISSION_CURRENT_DATA {
18787    #[doc = "Sequence"]
18788    pub seq: u16,
18789    #[doc = "Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle."]
18790    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18791    pub total: u16,
18792    #[doc = "Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported."]
18793    #[cfg_attr(feature = "serde", serde(default))]
18794    pub mission_state: MissionState,
18795    #[doc = "Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode)."]
18796    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18797    pub mission_mode: u8,
18798    #[doc = "Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK)."]
18799    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18800    pub mission_id: u32,
18801    #[doc = "Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK)."]
18802    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18803    pub fence_id: u32,
18804    #[doc = "Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK)."]
18805    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18806    pub rally_points_id: u32,
18807}
18808impl MISSION_CURRENT_DATA {
18809    pub const ENCODED_LEN: usize = 18usize;
18810    pub const DEFAULT: Self = Self {
18811        seq: 0_u16,
18812        total: 0_u16,
18813        mission_state: MissionState::DEFAULT,
18814        mission_mode: 0_u8,
18815        mission_id: 0_u32,
18816        fence_id: 0_u32,
18817        rally_points_id: 0_u32,
18818    };
18819    #[cfg(feature = "arbitrary")]
18820    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18821        use arbitrary::{Arbitrary, Unstructured};
18822        let mut buf = [0u8; 1024];
18823        rng.fill_bytes(&mut buf);
18824        let mut unstructured = Unstructured::new(&buf);
18825        Self::arbitrary(&mut unstructured).unwrap_or_default()
18826    }
18827}
18828impl Default for MISSION_CURRENT_DATA {
18829    fn default() -> Self {
18830        Self::DEFAULT.clone()
18831    }
18832}
18833impl MessageData for MISSION_CURRENT_DATA {
18834    type Message = MavMessage;
18835    const ID: u32 = 42u32;
18836    const NAME: &'static str = "MISSION_CURRENT";
18837    const EXTRA_CRC: u8 = 28u8;
18838    const ENCODED_LEN: usize = 18usize;
18839    fn deser(
18840        _version: MavlinkVersion,
18841        __input: &[u8],
18842    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18843        let avail_len = __input.len();
18844        let mut payload_buf = [0; Self::ENCODED_LEN];
18845        let mut buf = if avail_len < Self::ENCODED_LEN {
18846            payload_buf[0..avail_len].copy_from_slice(__input);
18847            Bytes::new(&payload_buf)
18848        } else {
18849            Bytes::new(__input)
18850        };
18851        let mut __struct = Self::default();
18852        __struct.seq = buf.get_u16_le();
18853        __struct.total = buf.get_u16_le();
18854        let tmp = buf.get_u8();
18855        __struct.mission_state =
18856            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18857                enum_type: "MissionState",
18858                value: tmp as u32,
18859            })?;
18860        __struct.mission_mode = buf.get_u8();
18861        __struct.mission_id = buf.get_u32_le();
18862        __struct.fence_id = buf.get_u32_le();
18863        __struct.rally_points_id = buf.get_u32_le();
18864        Ok(__struct)
18865    }
18866    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18867        let mut __tmp = BytesMut::new(bytes);
18868        #[allow(clippy::absurd_extreme_comparisons)]
18869        #[allow(unused_comparisons)]
18870        if __tmp.remaining() < Self::ENCODED_LEN {
18871            panic!(
18872                "buffer is too small (need {} bytes, but got {})",
18873                Self::ENCODED_LEN,
18874                __tmp.remaining(),
18875            )
18876        }
18877        __tmp.put_u16_le(self.seq);
18878        __tmp.put_u16_le(self.total);
18879        __tmp.put_u8(self.mission_state as u8);
18880        __tmp.put_u8(self.mission_mode);
18881        __tmp.put_u32_le(self.mission_id);
18882        __tmp.put_u32_le(self.fence_id);
18883        __tmp.put_u32_le(self.rally_points_id);
18884        if matches!(version, MavlinkVersion::V2) {
18885            let len = __tmp.len();
18886            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18887        } else {
18888            __tmp.len()
18889        }
18890    }
18891}
18892#[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
18893#[doc = "id: 39"]
18894#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
18895#[derive(Debug, Clone, PartialEq)]
18896#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18897#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18898pub struct MISSION_ITEM_DATA {
18899    #[doc = "PARAM1, see MAV_CMD enum"]
18900    pub param1: f32,
18901    #[doc = "PARAM2, see MAV_CMD enum"]
18902    pub param2: f32,
18903    #[doc = "PARAM3, see MAV_CMD enum"]
18904    pub param3: f32,
18905    #[doc = "PARAM4, see MAV_CMD enum"]
18906    pub param4: f32,
18907    #[doc = "PARAM5 / local: X coordinate, global: latitude"]
18908    pub x: f32,
18909    #[doc = "PARAM6 / local: Y coordinate, global: longitude"]
18910    pub y: f32,
18911    #[doc = "PARAM7 / local: Z coordinate, global: altitude (relative or absolute, depending on frame)."]
18912    pub z: f32,
18913    #[doc = "Sequence"]
18914    pub seq: u16,
18915    #[doc = "The scheduled action for the waypoint."]
18916    pub command: MavCmd,
18917    #[doc = "System ID"]
18918    pub target_system: u8,
18919    #[doc = "Component ID"]
18920    pub target_component: u8,
18921    #[doc = "The coordinate system of the waypoint."]
18922    pub frame: MavFrame,
18923    #[doc = "false:0, true:1"]
18924    pub current: u8,
18925    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
18926    pub autocontinue: u8,
18927    #[doc = "Mission type."]
18928    #[cfg_attr(feature = "serde", serde(default))]
18929    pub mission_type: MavMissionType,
18930}
18931impl MISSION_ITEM_DATA {
18932    pub const ENCODED_LEN: usize = 38usize;
18933    pub const DEFAULT: Self = Self {
18934        param1: 0.0_f32,
18935        param2: 0.0_f32,
18936        param3: 0.0_f32,
18937        param4: 0.0_f32,
18938        x: 0.0_f32,
18939        y: 0.0_f32,
18940        z: 0.0_f32,
18941        seq: 0_u16,
18942        command: MavCmd::DEFAULT,
18943        target_system: 0_u8,
18944        target_component: 0_u8,
18945        frame: MavFrame::DEFAULT,
18946        current: 0_u8,
18947        autocontinue: 0_u8,
18948        mission_type: MavMissionType::DEFAULT,
18949    };
18950    #[cfg(feature = "arbitrary")]
18951    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18952        use arbitrary::{Arbitrary, Unstructured};
18953        let mut buf = [0u8; 1024];
18954        rng.fill_bytes(&mut buf);
18955        let mut unstructured = Unstructured::new(&buf);
18956        Self::arbitrary(&mut unstructured).unwrap_or_default()
18957    }
18958}
18959impl Default for MISSION_ITEM_DATA {
18960    fn default() -> Self {
18961        Self::DEFAULT.clone()
18962    }
18963}
18964impl MessageData for MISSION_ITEM_DATA {
18965    type Message = MavMessage;
18966    const ID: u32 = 39u32;
18967    const NAME: &'static str = "MISSION_ITEM";
18968    const EXTRA_CRC: u8 = 254u8;
18969    const ENCODED_LEN: usize = 38usize;
18970    fn deser(
18971        _version: MavlinkVersion,
18972        __input: &[u8],
18973    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18974        let avail_len = __input.len();
18975        let mut payload_buf = [0; Self::ENCODED_LEN];
18976        let mut buf = if avail_len < Self::ENCODED_LEN {
18977            payload_buf[0..avail_len].copy_from_slice(__input);
18978            Bytes::new(&payload_buf)
18979        } else {
18980            Bytes::new(__input)
18981        };
18982        let mut __struct = Self::default();
18983        __struct.param1 = buf.get_f32_le();
18984        __struct.param2 = buf.get_f32_le();
18985        __struct.param3 = buf.get_f32_le();
18986        __struct.param4 = buf.get_f32_le();
18987        __struct.x = buf.get_f32_le();
18988        __struct.y = buf.get_f32_le();
18989        __struct.z = buf.get_f32_le();
18990        __struct.seq = buf.get_u16_le();
18991        let tmp = buf.get_u16_le();
18992        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
18993            ::mavlink_core::error::ParserError::InvalidEnum {
18994                enum_type: "MavCmd",
18995                value: tmp as u32,
18996            },
18997        )?;
18998        __struct.target_system = buf.get_u8();
18999        __struct.target_component = buf.get_u8();
19000        let tmp = buf.get_u8();
19001        __struct.frame =
19002            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19003                enum_type: "MavFrame",
19004                value: tmp as u32,
19005            })?;
19006        __struct.current = buf.get_u8();
19007        __struct.autocontinue = buf.get_u8();
19008        let tmp = buf.get_u8();
19009        __struct.mission_type =
19010            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19011                enum_type: "MavMissionType",
19012                value: tmp as u32,
19013            })?;
19014        Ok(__struct)
19015    }
19016    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19017        let mut __tmp = BytesMut::new(bytes);
19018        #[allow(clippy::absurd_extreme_comparisons)]
19019        #[allow(unused_comparisons)]
19020        if __tmp.remaining() < Self::ENCODED_LEN {
19021            panic!(
19022                "buffer is too small (need {} bytes, but got {})",
19023                Self::ENCODED_LEN,
19024                __tmp.remaining(),
19025            )
19026        }
19027        __tmp.put_f32_le(self.param1);
19028        __tmp.put_f32_le(self.param2);
19029        __tmp.put_f32_le(self.param3);
19030        __tmp.put_f32_le(self.param4);
19031        __tmp.put_f32_le(self.x);
19032        __tmp.put_f32_le(self.y);
19033        __tmp.put_f32_le(self.z);
19034        __tmp.put_u16_le(self.seq);
19035        __tmp.put_u16_le(self.command as u16);
19036        __tmp.put_u8(self.target_system);
19037        __tmp.put_u8(self.target_component);
19038        __tmp.put_u8(self.frame as u8);
19039        __tmp.put_u8(self.current);
19040        __tmp.put_u8(self.autocontinue);
19041        __tmp.put_u8(self.mission_type as u8);
19042        if matches!(version, MavlinkVersion::V2) {
19043            let len = __tmp.len();
19044            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19045        } else {
19046            __tmp.len()
19047        }
19048    }
19049}
19050#[doc = "id: 73"]
19051#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
19052#[derive(Debug, Clone, PartialEq)]
19053#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19054#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19055pub struct MISSION_ITEM_INT_DATA {
19056    #[doc = "PARAM1, see MAV_CMD enum"]
19057    pub param1: f32,
19058    #[doc = "PARAM2, see MAV_CMD enum"]
19059    pub param2: f32,
19060    #[doc = "PARAM3, see MAV_CMD enum"]
19061    pub param3: f32,
19062    #[doc = "PARAM4, see MAV_CMD enum"]
19063    pub param4: f32,
19064    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
19065    pub x: i32,
19066    #[doc = "PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7"]
19067    pub y: i32,
19068    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame."]
19069    pub z: f32,
19070    #[doc = "Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4)."]
19071    pub seq: u16,
19072    #[doc = "The scheduled action for the waypoint."]
19073    pub command: MavCmd,
19074    #[doc = "System ID"]
19075    pub target_system: u8,
19076    #[doc = "Component ID"]
19077    pub target_component: u8,
19078    #[doc = "The coordinate system of the waypoint."]
19079    pub frame: MavFrame,
19080    #[doc = "false:0, true:1"]
19081    pub current: u8,
19082    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
19083    pub autocontinue: u8,
19084    #[doc = "Mission type."]
19085    #[cfg_attr(feature = "serde", serde(default))]
19086    pub mission_type: MavMissionType,
19087}
19088impl MISSION_ITEM_INT_DATA {
19089    pub const ENCODED_LEN: usize = 38usize;
19090    pub const DEFAULT: Self = Self {
19091        param1: 0.0_f32,
19092        param2: 0.0_f32,
19093        param3: 0.0_f32,
19094        param4: 0.0_f32,
19095        x: 0_i32,
19096        y: 0_i32,
19097        z: 0.0_f32,
19098        seq: 0_u16,
19099        command: MavCmd::DEFAULT,
19100        target_system: 0_u8,
19101        target_component: 0_u8,
19102        frame: MavFrame::DEFAULT,
19103        current: 0_u8,
19104        autocontinue: 0_u8,
19105        mission_type: MavMissionType::DEFAULT,
19106    };
19107    #[cfg(feature = "arbitrary")]
19108    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19109        use arbitrary::{Arbitrary, Unstructured};
19110        let mut buf = [0u8; 1024];
19111        rng.fill_bytes(&mut buf);
19112        let mut unstructured = Unstructured::new(&buf);
19113        Self::arbitrary(&mut unstructured).unwrap_or_default()
19114    }
19115}
19116impl Default for MISSION_ITEM_INT_DATA {
19117    fn default() -> Self {
19118        Self::DEFAULT.clone()
19119    }
19120}
19121impl MessageData for MISSION_ITEM_INT_DATA {
19122    type Message = MavMessage;
19123    const ID: u32 = 73u32;
19124    const NAME: &'static str = "MISSION_ITEM_INT";
19125    const EXTRA_CRC: u8 = 38u8;
19126    const ENCODED_LEN: usize = 38usize;
19127    fn deser(
19128        _version: MavlinkVersion,
19129        __input: &[u8],
19130    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19131        let avail_len = __input.len();
19132        let mut payload_buf = [0; Self::ENCODED_LEN];
19133        let mut buf = if avail_len < Self::ENCODED_LEN {
19134            payload_buf[0..avail_len].copy_from_slice(__input);
19135            Bytes::new(&payload_buf)
19136        } else {
19137            Bytes::new(__input)
19138        };
19139        let mut __struct = Self::default();
19140        __struct.param1 = buf.get_f32_le();
19141        __struct.param2 = buf.get_f32_le();
19142        __struct.param3 = buf.get_f32_le();
19143        __struct.param4 = buf.get_f32_le();
19144        __struct.x = buf.get_i32_le();
19145        __struct.y = buf.get_i32_le();
19146        __struct.z = buf.get_f32_le();
19147        __struct.seq = buf.get_u16_le();
19148        let tmp = buf.get_u16_le();
19149        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
19150            ::mavlink_core::error::ParserError::InvalidEnum {
19151                enum_type: "MavCmd",
19152                value: tmp as u32,
19153            },
19154        )?;
19155        __struct.target_system = buf.get_u8();
19156        __struct.target_component = buf.get_u8();
19157        let tmp = buf.get_u8();
19158        __struct.frame =
19159            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19160                enum_type: "MavFrame",
19161                value: tmp as u32,
19162            })?;
19163        __struct.current = buf.get_u8();
19164        __struct.autocontinue = buf.get_u8();
19165        let tmp = buf.get_u8();
19166        __struct.mission_type =
19167            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19168                enum_type: "MavMissionType",
19169                value: tmp as u32,
19170            })?;
19171        Ok(__struct)
19172    }
19173    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19174        let mut __tmp = BytesMut::new(bytes);
19175        #[allow(clippy::absurd_extreme_comparisons)]
19176        #[allow(unused_comparisons)]
19177        if __tmp.remaining() < Self::ENCODED_LEN {
19178            panic!(
19179                "buffer is too small (need {} bytes, but got {})",
19180                Self::ENCODED_LEN,
19181                __tmp.remaining(),
19182            )
19183        }
19184        __tmp.put_f32_le(self.param1);
19185        __tmp.put_f32_le(self.param2);
19186        __tmp.put_f32_le(self.param3);
19187        __tmp.put_f32_le(self.param4);
19188        __tmp.put_i32_le(self.x);
19189        __tmp.put_i32_le(self.y);
19190        __tmp.put_f32_le(self.z);
19191        __tmp.put_u16_le(self.seq);
19192        __tmp.put_u16_le(self.command as u16);
19193        __tmp.put_u8(self.target_system);
19194        __tmp.put_u8(self.target_component);
19195        __tmp.put_u8(self.frame as u8);
19196        __tmp.put_u8(self.current);
19197        __tmp.put_u8(self.autocontinue);
19198        __tmp.put_u8(self.mission_type as u8);
19199        if matches!(version, MavlinkVersion::V2) {
19200            let len = __tmp.len();
19201            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19202        } else {
19203            __tmp.len()
19204        }
19205    }
19206}
19207#[doc = "id: 46"]
19208#[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
19209#[derive(Debug, Clone, PartialEq)]
19210#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19211#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19212pub struct MISSION_ITEM_REACHED_DATA {
19213    #[doc = "Sequence"]
19214    pub seq: u16,
19215}
19216impl MISSION_ITEM_REACHED_DATA {
19217    pub const ENCODED_LEN: usize = 2usize;
19218    pub const DEFAULT: Self = Self { seq: 0_u16 };
19219    #[cfg(feature = "arbitrary")]
19220    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19221        use arbitrary::{Arbitrary, Unstructured};
19222        let mut buf = [0u8; 1024];
19223        rng.fill_bytes(&mut buf);
19224        let mut unstructured = Unstructured::new(&buf);
19225        Self::arbitrary(&mut unstructured).unwrap_or_default()
19226    }
19227}
19228impl Default for MISSION_ITEM_REACHED_DATA {
19229    fn default() -> Self {
19230        Self::DEFAULT.clone()
19231    }
19232}
19233impl MessageData for MISSION_ITEM_REACHED_DATA {
19234    type Message = MavMessage;
19235    const ID: u32 = 46u32;
19236    const NAME: &'static str = "MISSION_ITEM_REACHED";
19237    const EXTRA_CRC: u8 = 11u8;
19238    const ENCODED_LEN: usize = 2usize;
19239    fn deser(
19240        _version: MavlinkVersion,
19241        __input: &[u8],
19242    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19243        let avail_len = __input.len();
19244        let mut payload_buf = [0; Self::ENCODED_LEN];
19245        let mut buf = if avail_len < Self::ENCODED_LEN {
19246            payload_buf[0..avail_len].copy_from_slice(__input);
19247            Bytes::new(&payload_buf)
19248        } else {
19249            Bytes::new(__input)
19250        };
19251        let mut __struct = Self::default();
19252        __struct.seq = buf.get_u16_le();
19253        Ok(__struct)
19254    }
19255    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19256        let mut __tmp = BytesMut::new(bytes);
19257        #[allow(clippy::absurd_extreme_comparisons)]
19258        #[allow(unused_comparisons)]
19259        if __tmp.remaining() < Self::ENCODED_LEN {
19260            panic!(
19261                "buffer is too small (need {} bytes, but got {})",
19262                Self::ENCODED_LEN,
19263                __tmp.remaining(),
19264            )
19265        }
19266        __tmp.put_u16_le(self.seq);
19267        if matches!(version, MavlinkVersion::V2) {
19268            let len = __tmp.len();
19269            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19270        } else {
19271            __tmp.len()
19272        }
19273    }
19274}
19275#[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
19276#[doc = "id: 40"]
19277#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
19278#[derive(Debug, Clone, PartialEq)]
19279#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19280#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19281pub struct MISSION_REQUEST_DATA {
19282    #[doc = "Sequence"]
19283    pub seq: u16,
19284    #[doc = "System ID"]
19285    pub target_system: u8,
19286    #[doc = "Component ID"]
19287    pub target_component: u8,
19288    #[doc = "Mission type."]
19289    #[cfg_attr(feature = "serde", serde(default))]
19290    pub mission_type: MavMissionType,
19291}
19292impl MISSION_REQUEST_DATA {
19293    pub const ENCODED_LEN: usize = 5usize;
19294    pub const DEFAULT: Self = Self {
19295        seq: 0_u16,
19296        target_system: 0_u8,
19297        target_component: 0_u8,
19298        mission_type: MavMissionType::DEFAULT,
19299    };
19300    #[cfg(feature = "arbitrary")]
19301    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19302        use arbitrary::{Arbitrary, Unstructured};
19303        let mut buf = [0u8; 1024];
19304        rng.fill_bytes(&mut buf);
19305        let mut unstructured = Unstructured::new(&buf);
19306        Self::arbitrary(&mut unstructured).unwrap_or_default()
19307    }
19308}
19309impl Default for MISSION_REQUEST_DATA {
19310    fn default() -> Self {
19311        Self::DEFAULT.clone()
19312    }
19313}
19314impl MessageData for MISSION_REQUEST_DATA {
19315    type Message = MavMessage;
19316    const ID: u32 = 40u32;
19317    const NAME: &'static str = "MISSION_REQUEST";
19318    const EXTRA_CRC: u8 = 230u8;
19319    const ENCODED_LEN: usize = 5usize;
19320    fn deser(
19321        _version: MavlinkVersion,
19322        __input: &[u8],
19323    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19324        let avail_len = __input.len();
19325        let mut payload_buf = [0; Self::ENCODED_LEN];
19326        let mut buf = if avail_len < Self::ENCODED_LEN {
19327            payload_buf[0..avail_len].copy_from_slice(__input);
19328            Bytes::new(&payload_buf)
19329        } else {
19330            Bytes::new(__input)
19331        };
19332        let mut __struct = Self::default();
19333        __struct.seq = buf.get_u16_le();
19334        __struct.target_system = buf.get_u8();
19335        __struct.target_component = buf.get_u8();
19336        let tmp = buf.get_u8();
19337        __struct.mission_type =
19338            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19339                enum_type: "MavMissionType",
19340                value: tmp as u32,
19341            })?;
19342        Ok(__struct)
19343    }
19344    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19345        let mut __tmp = BytesMut::new(bytes);
19346        #[allow(clippy::absurd_extreme_comparisons)]
19347        #[allow(unused_comparisons)]
19348        if __tmp.remaining() < Self::ENCODED_LEN {
19349            panic!(
19350                "buffer is too small (need {} bytes, but got {})",
19351                Self::ENCODED_LEN,
19352                __tmp.remaining(),
19353            )
19354        }
19355        __tmp.put_u16_le(self.seq);
19356        __tmp.put_u8(self.target_system);
19357        __tmp.put_u8(self.target_component);
19358        __tmp.put_u8(self.mission_type as u8);
19359        if matches!(version, MavlinkVersion::V2) {
19360            let len = __tmp.len();
19361            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19362        } else {
19363            __tmp.len()
19364        }
19365    }
19366}
19367#[doc = "id: 51"]
19368#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
19369#[derive(Debug, Clone, PartialEq)]
19370#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19371#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19372pub struct MISSION_REQUEST_INT_DATA {
19373    #[doc = "Sequence"]
19374    pub seq: u16,
19375    #[doc = "System ID"]
19376    pub target_system: u8,
19377    #[doc = "Component ID"]
19378    pub target_component: u8,
19379    #[doc = "Mission type."]
19380    #[cfg_attr(feature = "serde", serde(default))]
19381    pub mission_type: MavMissionType,
19382}
19383impl MISSION_REQUEST_INT_DATA {
19384    pub const ENCODED_LEN: usize = 5usize;
19385    pub const DEFAULT: Self = Self {
19386        seq: 0_u16,
19387        target_system: 0_u8,
19388        target_component: 0_u8,
19389        mission_type: MavMissionType::DEFAULT,
19390    };
19391    #[cfg(feature = "arbitrary")]
19392    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19393        use arbitrary::{Arbitrary, Unstructured};
19394        let mut buf = [0u8; 1024];
19395        rng.fill_bytes(&mut buf);
19396        let mut unstructured = Unstructured::new(&buf);
19397        Self::arbitrary(&mut unstructured).unwrap_or_default()
19398    }
19399}
19400impl Default for MISSION_REQUEST_INT_DATA {
19401    fn default() -> Self {
19402        Self::DEFAULT.clone()
19403    }
19404}
19405impl MessageData for MISSION_REQUEST_INT_DATA {
19406    type Message = MavMessage;
19407    const ID: u32 = 51u32;
19408    const NAME: &'static str = "MISSION_REQUEST_INT";
19409    const EXTRA_CRC: u8 = 196u8;
19410    const ENCODED_LEN: usize = 5usize;
19411    fn deser(
19412        _version: MavlinkVersion,
19413        __input: &[u8],
19414    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19415        let avail_len = __input.len();
19416        let mut payload_buf = [0; Self::ENCODED_LEN];
19417        let mut buf = if avail_len < Self::ENCODED_LEN {
19418            payload_buf[0..avail_len].copy_from_slice(__input);
19419            Bytes::new(&payload_buf)
19420        } else {
19421            Bytes::new(__input)
19422        };
19423        let mut __struct = Self::default();
19424        __struct.seq = buf.get_u16_le();
19425        __struct.target_system = buf.get_u8();
19426        __struct.target_component = buf.get_u8();
19427        let tmp = buf.get_u8();
19428        __struct.mission_type =
19429            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19430                enum_type: "MavMissionType",
19431                value: tmp as u32,
19432            })?;
19433        Ok(__struct)
19434    }
19435    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19436        let mut __tmp = BytesMut::new(bytes);
19437        #[allow(clippy::absurd_extreme_comparisons)]
19438        #[allow(unused_comparisons)]
19439        if __tmp.remaining() < Self::ENCODED_LEN {
19440            panic!(
19441                "buffer is too small (need {} bytes, but got {})",
19442                Self::ENCODED_LEN,
19443                __tmp.remaining(),
19444            )
19445        }
19446        __tmp.put_u16_le(self.seq);
19447        __tmp.put_u8(self.target_system);
19448        __tmp.put_u8(self.target_component);
19449        __tmp.put_u8(self.mission_type as u8);
19450        if matches!(version, MavlinkVersion::V2) {
19451            let len = __tmp.len();
19452            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19453        } else {
19454            __tmp.len()
19455        }
19456    }
19457}
19458#[doc = "id: 43"]
19459#[doc = "Request the overall list of mission items from the system/component."]
19460#[derive(Debug, Clone, PartialEq)]
19461#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19462#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19463pub struct MISSION_REQUEST_LIST_DATA {
19464    #[doc = "System ID"]
19465    pub target_system: u8,
19466    #[doc = "Component ID"]
19467    pub target_component: u8,
19468    #[doc = "Mission type."]
19469    #[cfg_attr(feature = "serde", serde(default))]
19470    pub mission_type: MavMissionType,
19471}
19472impl MISSION_REQUEST_LIST_DATA {
19473    pub const ENCODED_LEN: usize = 3usize;
19474    pub const DEFAULT: Self = Self {
19475        target_system: 0_u8,
19476        target_component: 0_u8,
19477        mission_type: MavMissionType::DEFAULT,
19478    };
19479    #[cfg(feature = "arbitrary")]
19480    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19481        use arbitrary::{Arbitrary, Unstructured};
19482        let mut buf = [0u8; 1024];
19483        rng.fill_bytes(&mut buf);
19484        let mut unstructured = Unstructured::new(&buf);
19485        Self::arbitrary(&mut unstructured).unwrap_or_default()
19486    }
19487}
19488impl Default for MISSION_REQUEST_LIST_DATA {
19489    fn default() -> Self {
19490        Self::DEFAULT.clone()
19491    }
19492}
19493impl MessageData for MISSION_REQUEST_LIST_DATA {
19494    type Message = MavMessage;
19495    const ID: u32 = 43u32;
19496    const NAME: &'static str = "MISSION_REQUEST_LIST";
19497    const EXTRA_CRC: u8 = 132u8;
19498    const ENCODED_LEN: usize = 3usize;
19499    fn deser(
19500        _version: MavlinkVersion,
19501        __input: &[u8],
19502    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19503        let avail_len = __input.len();
19504        let mut payload_buf = [0; Self::ENCODED_LEN];
19505        let mut buf = if avail_len < Self::ENCODED_LEN {
19506            payload_buf[0..avail_len].copy_from_slice(__input);
19507            Bytes::new(&payload_buf)
19508        } else {
19509            Bytes::new(__input)
19510        };
19511        let mut __struct = Self::default();
19512        __struct.target_system = buf.get_u8();
19513        __struct.target_component = buf.get_u8();
19514        let tmp = buf.get_u8();
19515        __struct.mission_type =
19516            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19517                enum_type: "MavMissionType",
19518                value: tmp as u32,
19519            })?;
19520        Ok(__struct)
19521    }
19522    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19523        let mut __tmp = BytesMut::new(bytes);
19524        #[allow(clippy::absurd_extreme_comparisons)]
19525        #[allow(unused_comparisons)]
19526        if __tmp.remaining() < Self::ENCODED_LEN {
19527            panic!(
19528                "buffer is too small (need {} bytes, but got {})",
19529                Self::ENCODED_LEN,
19530                __tmp.remaining(),
19531            )
19532        }
19533        __tmp.put_u8(self.target_system);
19534        __tmp.put_u8(self.target_component);
19535        __tmp.put_u8(self.mission_type as u8);
19536        if matches!(version, MavlinkVersion::V2) {
19537            let len = __tmp.len();
19538            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19539        } else {
19540            __tmp.len()
19541        }
19542    }
19543}
19544#[doc = "id: 37"]
19545#[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
19546#[derive(Debug, Clone, PartialEq)]
19547#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19548#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19549pub struct MISSION_REQUEST_PARTIAL_LIST_DATA {
19550    #[doc = "Start index"]
19551    pub start_index: i16,
19552    #[doc = "End index, -1 by default (-1: send list to end). Else a valid index of the list"]
19553    pub end_index: i16,
19554    #[doc = "System ID"]
19555    pub target_system: u8,
19556    #[doc = "Component ID"]
19557    pub target_component: u8,
19558    #[doc = "Mission type."]
19559    #[cfg_attr(feature = "serde", serde(default))]
19560    pub mission_type: MavMissionType,
19561}
19562impl MISSION_REQUEST_PARTIAL_LIST_DATA {
19563    pub const ENCODED_LEN: usize = 7usize;
19564    pub const DEFAULT: Self = Self {
19565        start_index: 0_i16,
19566        end_index: 0_i16,
19567        target_system: 0_u8,
19568        target_component: 0_u8,
19569        mission_type: MavMissionType::DEFAULT,
19570    };
19571    #[cfg(feature = "arbitrary")]
19572    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19573        use arbitrary::{Arbitrary, Unstructured};
19574        let mut buf = [0u8; 1024];
19575        rng.fill_bytes(&mut buf);
19576        let mut unstructured = Unstructured::new(&buf);
19577        Self::arbitrary(&mut unstructured).unwrap_or_default()
19578    }
19579}
19580impl Default for MISSION_REQUEST_PARTIAL_LIST_DATA {
19581    fn default() -> Self {
19582        Self::DEFAULT.clone()
19583    }
19584}
19585impl MessageData for MISSION_REQUEST_PARTIAL_LIST_DATA {
19586    type Message = MavMessage;
19587    const ID: u32 = 37u32;
19588    const NAME: &'static str = "MISSION_REQUEST_PARTIAL_LIST";
19589    const EXTRA_CRC: u8 = 212u8;
19590    const ENCODED_LEN: usize = 7usize;
19591    fn deser(
19592        _version: MavlinkVersion,
19593        __input: &[u8],
19594    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19595        let avail_len = __input.len();
19596        let mut payload_buf = [0; Self::ENCODED_LEN];
19597        let mut buf = if avail_len < Self::ENCODED_LEN {
19598            payload_buf[0..avail_len].copy_from_slice(__input);
19599            Bytes::new(&payload_buf)
19600        } else {
19601            Bytes::new(__input)
19602        };
19603        let mut __struct = Self::default();
19604        __struct.start_index = buf.get_i16_le();
19605        __struct.end_index = buf.get_i16_le();
19606        __struct.target_system = buf.get_u8();
19607        __struct.target_component = buf.get_u8();
19608        let tmp = buf.get_u8();
19609        __struct.mission_type =
19610            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19611                enum_type: "MavMissionType",
19612                value: tmp as u32,
19613            })?;
19614        Ok(__struct)
19615    }
19616    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19617        let mut __tmp = BytesMut::new(bytes);
19618        #[allow(clippy::absurd_extreme_comparisons)]
19619        #[allow(unused_comparisons)]
19620        if __tmp.remaining() < Self::ENCODED_LEN {
19621            panic!(
19622                "buffer is too small (need {} bytes, but got {})",
19623                Self::ENCODED_LEN,
19624                __tmp.remaining(),
19625            )
19626        }
19627        __tmp.put_i16_le(self.start_index);
19628        __tmp.put_i16_le(self.end_index);
19629        __tmp.put_u8(self.target_system);
19630        __tmp.put_u8(self.target_component);
19631        __tmp.put_u8(self.mission_type as u8);
19632        if matches!(version, MavlinkVersion::V2) {
19633            let len = __tmp.len();
19634            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19635        } else {
19636            __tmp.len()
19637        }
19638    }
19639}
19640#[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
19641#[doc = "id: 41"]
19642#[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
19643#[derive(Debug, Clone, PartialEq)]
19644#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19645#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19646pub struct MISSION_SET_CURRENT_DATA {
19647    #[doc = "Sequence"]
19648    pub seq: u16,
19649    #[doc = "System ID"]
19650    pub target_system: u8,
19651    #[doc = "Component ID"]
19652    pub target_component: u8,
19653}
19654impl MISSION_SET_CURRENT_DATA {
19655    pub const ENCODED_LEN: usize = 4usize;
19656    pub const DEFAULT: Self = Self {
19657        seq: 0_u16,
19658        target_system: 0_u8,
19659        target_component: 0_u8,
19660    };
19661    #[cfg(feature = "arbitrary")]
19662    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19663        use arbitrary::{Arbitrary, Unstructured};
19664        let mut buf = [0u8; 1024];
19665        rng.fill_bytes(&mut buf);
19666        let mut unstructured = Unstructured::new(&buf);
19667        Self::arbitrary(&mut unstructured).unwrap_or_default()
19668    }
19669}
19670impl Default for MISSION_SET_CURRENT_DATA {
19671    fn default() -> Self {
19672        Self::DEFAULT.clone()
19673    }
19674}
19675impl MessageData for MISSION_SET_CURRENT_DATA {
19676    type Message = MavMessage;
19677    const ID: u32 = 41u32;
19678    const NAME: &'static str = "MISSION_SET_CURRENT";
19679    const EXTRA_CRC: u8 = 28u8;
19680    const ENCODED_LEN: usize = 4usize;
19681    fn deser(
19682        _version: MavlinkVersion,
19683        __input: &[u8],
19684    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19685        let avail_len = __input.len();
19686        let mut payload_buf = [0; Self::ENCODED_LEN];
19687        let mut buf = if avail_len < Self::ENCODED_LEN {
19688            payload_buf[0..avail_len].copy_from_slice(__input);
19689            Bytes::new(&payload_buf)
19690        } else {
19691            Bytes::new(__input)
19692        };
19693        let mut __struct = Self::default();
19694        __struct.seq = buf.get_u16_le();
19695        __struct.target_system = buf.get_u8();
19696        __struct.target_component = buf.get_u8();
19697        Ok(__struct)
19698    }
19699    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19700        let mut __tmp = BytesMut::new(bytes);
19701        #[allow(clippy::absurd_extreme_comparisons)]
19702        #[allow(unused_comparisons)]
19703        if __tmp.remaining() < Self::ENCODED_LEN {
19704            panic!(
19705                "buffer is too small (need {} bytes, but got {})",
19706                Self::ENCODED_LEN,
19707                __tmp.remaining(),
19708            )
19709        }
19710        __tmp.put_u16_le(self.seq);
19711        __tmp.put_u8(self.target_system);
19712        __tmp.put_u8(self.target_component);
19713        if matches!(version, MavlinkVersion::V2) {
19714            let len = __tmp.len();
19715            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19716        } else {
19717            __tmp.len()
19718        }
19719    }
19720}
19721#[doc = "id: 38"]
19722#[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
19723#[derive(Debug, Clone, PartialEq)]
19724#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19725#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19726pub struct MISSION_WRITE_PARTIAL_LIST_DATA {
19727    #[doc = "Start index. Must be smaller / equal to the largest index of the current onboard list."]
19728    pub start_index: i16,
19729    #[doc = "End index, equal or greater than start index."]
19730    pub end_index: i16,
19731    #[doc = "System ID"]
19732    pub target_system: u8,
19733    #[doc = "Component ID"]
19734    pub target_component: u8,
19735    #[doc = "Mission type."]
19736    #[cfg_attr(feature = "serde", serde(default))]
19737    pub mission_type: MavMissionType,
19738}
19739impl MISSION_WRITE_PARTIAL_LIST_DATA {
19740    pub const ENCODED_LEN: usize = 7usize;
19741    pub const DEFAULT: Self = Self {
19742        start_index: 0_i16,
19743        end_index: 0_i16,
19744        target_system: 0_u8,
19745        target_component: 0_u8,
19746        mission_type: MavMissionType::DEFAULT,
19747    };
19748    #[cfg(feature = "arbitrary")]
19749    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19750        use arbitrary::{Arbitrary, Unstructured};
19751        let mut buf = [0u8; 1024];
19752        rng.fill_bytes(&mut buf);
19753        let mut unstructured = Unstructured::new(&buf);
19754        Self::arbitrary(&mut unstructured).unwrap_or_default()
19755    }
19756}
19757impl Default for MISSION_WRITE_PARTIAL_LIST_DATA {
19758    fn default() -> Self {
19759        Self::DEFAULT.clone()
19760    }
19761}
19762impl MessageData for MISSION_WRITE_PARTIAL_LIST_DATA {
19763    type Message = MavMessage;
19764    const ID: u32 = 38u32;
19765    const NAME: &'static str = "MISSION_WRITE_PARTIAL_LIST";
19766    const EXTRA_CRC: u8 = 9u8;
19767    const ENCODED_LEN: usize = 7usize;
19768    fn deser(
19769        _version: MavlinkVersion,
19770        __input: &[u8],
19771    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19772        let avail_len = __input.len();
19773        let mut payload_buf = [0; Self::ENCODED_LEN];
19774        let mut buf = if avail_len < Self::ENCODED_LEN {
19775            payload_buf[0..avail_len].copy_from_slice(__input);
19776            Bytes::new(&payload_buf)
19777        } else {
19778            Bytes::new(__input)
19779        };
19780        let mut __struct = Self::default();
19781        __struct.start_index = buf.get_i16_le();
19782        __struct.end_index = buf.get_i16_le();
19783        __struct.target_system = buf.get_u8();
19784        __struct.target_component = buf.get_u8();
19785        let tmp = buf.get_u8();
19786        __struct.mission_type =
19787            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19788                enum_type: "MavMissionType",
19789                value: tmp as u32,
19790            })?;
19791        Ok(__struct)
19792    }
19793    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19794        let mut __tmp = BytesMut::new(bytes);
19795        #[allow(clippy::absurd_extreme_comparisons)]
19796        #[allow(unused_comparisons)]
19797        if __tmp.remaining() < Self::ENCODED_LEN {
19798            panic!(
19799                "buffer is too small (need {} bytes, but got {})",
19800                Self::ENCODED_LEN,
19801                __tmp.remaining(),
19802            )
19803        }
19804        __tmp.put_i16_le(self.start_index);
19805        __tmp.put_i16_le(self.end_index);
19806        __tmp.put_u8(self.target_system);
19807        __tmp.put_u8(self.target_component);
19808        __tmp.put_u8(self.mission_type as u8);
19809        if matches!(version, MavlinkVersion::V2) {
19810            let len = __tmp.len();
19811            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19812        } else {
19813            __tmp.len()
19814        }
19815    }
19816}
19817#[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
19818#[doc = "id: 265"]
19819#[doc = "Orientation of a mount."]
19820#[derive(Debug, Clone, PartialEq)]
19821#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19822#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19823pub struct MOUNT_ORIENTATION_DATA {
19824    #[doc = "Timestamp (time since system boot)."]
19825    pub time_boot_ms: u32,
19826    #[doc = "Roll in global frame (set to NaN for invalid)."]
19827    pub roll: f32,
19828    #[doc = "Pitch in global frame (set to NaN for invalid)."]
19829    pub pitch: f32,
19830    #[doc = "Yaw relative to vehicle (set to NaN for invalid)."]
19831    pub yaw: f32,
19832    #[doc = "Yaw in absolute frame relative to Earth's North, north is 0 (set to NaN for invalid)."]
19833    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19834    pub yaw_absolute: f32,
19835}
19836impl MOUNT_ORIENTATION_DATA {
19837    pub const ENCODED_LEN: usize = 20usize;
19838    pub const DEFAULT: Self = Self {
19839        time_boot_ms: 0_u32,
19840        roll: 0.0_f32,
19841        pitch: 0.0_f32,
19842        yaw: 0.0_f32,
19843        yaw_absolute: 0.0_f32,
19844    };
19845    #[cfg(feature = "arbitrary")]
19846    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19847        use arbitrary::{Arbitrary, Unstructured};
19848        let mut buf = [0u8; 1024];
19849        rng.fill_bytes(&mut buf);
19850        let mut unstructured = Unstructured::new(&buf);
19851        Self::arbitrary(&mut unstructured).unwrap_or_default()
19852    }
19853}
19854impl Default for MOUNT_ORIENTATION_DATA {
19855    fn default() -> Self {
19856        Self::DEFAULT.clone()
19857    }
19858}
19859impl MessageData for MOUNT_ORIENTATION_DATA {
19860    type Message = MavMessage;
19861    const ID: u32 = 265u32;
19862    const NAME: &'static str = "MOUNT_ORIENTATION";
19863    const EXTRA_CRC: u8 = 26u8;
19864    const ENCODED_LEN: usize = 20usize;
19865    fn deser(
19866        _version: MavlinkVersion,
19867        __input: &[u8],
19868    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19869        let avail_len = __input.len();
19870        let mut payload_buf = [0; Self::ENCODED_LEN];
19871        let mut buf = if avail_len < Self::ENCODED_LEN {
19872            payload_buf[0..avail_len].copy_from_slice(__input);
19873            Bytes::new(&payload_buf)
19874        } else {
19875            Bytes::new(__input)
19876        };
19877        let mut __struct = Self::default();
19878        __struct.time_boot_ms = buf.get_u32_le();
19879        __struct.roll = buf.get_f32_le();
19880        __struct.pitch = buf.get_f32_le();
19881        __struct.yaw = buf.get_f32_le();
19882        __struct.yaw_absolute = buf.get_f32_le();
19883        Ok(__struct)
19884    }
19885    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19886        let mut __tmp = BytesMut::new(bytes);
19887        #[allow(clippy::absurd_extreme_comparisons)]
19888        #[allow(unused_comparisons)]
19889        if __tmp.remaining() < Self::ENCODED_LEN {
19890            panic!(
19891                "buffer is too small (need {} bytes, but got {})",
19892                Self::ENCODED_LEN,
19893                __tmp.remaining(),
19894            )
19895        }
19896        __tmp.put_u32_le(self.time_boot_ms);
19897        __tmp.put_f32_le(self.roll);
19898        __tmp.put_f32_le(self.pitch);
19899        __tmp.put_f32_le(self.yaw);
19900        __tmp.put_f32_le(self.yaw_absolute);
19901        if matches!(version, MavlinkVersion::V2) {
19902            let len = __tmp.len();
19903            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19904        } else {
19905            __tmp.len()
19906        }
19907    }
19908}
19909#[doc = "id: 251"]
19910#[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
19911#[derive(Debug, Clone, PartialEq)]
19912#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19913#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19914pub struct NAMED_VALUE_FLOAT_DATA {
19915    #[doc = "Timestamp (time since system boot)."]
19916    pub time_boot_ms: u32,
19917    #[doc = "Floating point value"]
19918    pub value: f32,
19919    #[doc = "Name of the debug variable"]
19920    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19921    pub name: [u8; 10],
19922}
19923impl NAMED_VALUE_FLOAT_DATA {
19924    pub const ENCODED_LEN: usize = 18usize;
19925    pub const DEFAULT: Self = Self {
19926        time_boot_ms: 0_u32,
19927        value: 0.0_f32,
19928        name: [0_u8; 10usize],
19929    };
19930    #[cfg(feature = "arbitrary")]
19931    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19932        use arbitrary::{Arbitrary, Unstructured};
19933        let mut buf = [0u8; 1024];
19934        rng.fill_bytes(&mut buf);
19935        let mut unstructured = Unstructured::new(&buf);
19936        Self::arbitrary(&mut unstructured).unwrap_or_default()
19937    }
19938}
19939impl Default for NAMED_VALUE_FLOAT_DATA {
19940    fn default() -> Self {
19941        Self::DEFAULT.clone()
19942    }
19943}
19944impl MessageData for NAMED_VALUE_FLOAT_DATA {
19945    type Message = MavMessage;
19946    const ID: u32 = 251u32;
19947    const NAME: &'static str = "NAMED_VALUE_FLOAT";
19948    const EXTRA_CRC: u8 = 170u8;
19949    const ENCODED_LEN: usize = 18usize;
19950    fn deser(
19951        _version: MavlinkVersion,
19952        __input: &[u8],
19953    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19954        let avail_len = __input.len();
19955        let mut payload_buf = [0; Self::ENCODED_LEN];
19956        let mut buf = if avail_len < Self::ENCODED_LEN {
19957            payload_buf[0..avail_len].copy_from_slice(__input);
19958            Bytes::new(&payload_buf)
19959        } else {
19960            Bytes::new(__input)
19961        };
19962        let mut __struct = Self::default();
19963        __struct.time_boot_ms = buf.get_u32_le();
19964        __struct.value = buf.get_f32_le();
19965        for v in &mut __struct.name {
19966            let val = buf.get_u8();
19967            *v = val;
19968        }
19969        Ok(__struct)
19970    }
19971    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19972        let mut __tmp = BytesMut::new(bytes);
19973        #[allow(clippy::absurd_extreme_comparisons)]
19974        #[allow(unused_comparisons)]
19975        if __tmp.remaining() < Self::ENCODED_LEN {
19976            panic!(
19977                "buffer is too small (need {} bytes, but got {})",
19978                Self::ENCODED_LEN,
19979                __tmp.remaining(),
19980            )
19981        }
19982        __tmp.put_u32_le(self.time_boot_ms);
19983        __tmp.put_f32_le(self.value);
19984        for val in &self.name {
19985            __tmp.put_u8(*val);
19986        }
19987        if matches!(version, MavlinkVersion::V2) {
19988            let len = __tmp.len();
19989            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19990        } else {
19991            __tmp.len()
19992        }
19993    }
19994}
19995#[doc = "id: 252"]
19996#[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
19997#[derive(Debug, Clone, PartialEq)]
19998#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19999#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20000pub struct NAMED_VALUE_INT_DATA {
20001    #[doc = "Timestamp (time since system boot)."]
20002    pub time_boot_ms: u32,
20003    #[doc = "Signed integer value"]
20004    pub value: i32,
20005    #[doc = "Name of the debug variable"]
20006    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20007    pub name: [u8; 10],
20008}
20009impl NAMED_VALUE_INT_DATA {
20010    pub const ENCODED_LEN: usize = 18usize;
20011    pub const DEFAULT: Self = Self {
20012        time_boot_ms: 0_u32,
20013        value: 0_i32,
20014        name: [0_u8; 10usize],
20015    };
20016    #[cfg(feature = "arbitrary")]
20017    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20018        use arbitrary::{Arbitrary, Unstructured};
20019        let mut buf = [0u8; 1024];
20020        rng.fill_bytes(&mut buf);
20021        let mut unstructured = Unstructured::new(&buf);
20022        Self::arbitrary(&mut unstructured).unwrap_or_default()
20023    }
20024}
20025impl Default for NAMED_VALUE_INT_DATA {
20026    fn default() -> Self {
20027        Self::DEFAULT.clone()
20028    }
20029}
20030impl MessageData for NAMED_VALUE_INT_DATA {
20031    type Message = MavMessage;
20032    const ID: u32 = 252u32;
20033    const NAME: &'static str = "NAMED_VALUE_INT";
20034    const EXTRA_CRC: u8 = 44u8;
20035    const ENCODED_LEN: usize = 18usize;
20036    fn deser(
20037        _version: MavlinkVersion,
20038        __input: &[u8],
20039    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20040        let avail_len = __input.len();
20041        let mut payload_buf = [0; Self::ENCODED_LEN];
20042        let mut buf = if avail_len < Self::ENCODED_LEN {
20043            payload_buf[0..avail_len].copy_from_slice(__input);
20044            Bytes::new(&payload_buf)
20045        } else {
20046            Bytes::new(__input)
20047        };
20048        let mut __struct = Self::default();
20049        __struct.time_boot_ms = buf.get_u32_le();
20050        __struct.value = buf.get_i32_le();
20051        for v in &mut __struct.name {
20052            let val = buf.get_u8();
20053            *v = val;
20054        }
20055        Ok(__struct)
20056    }
20057    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20058        let mut __tmp = BytesMut::new(bytes);
20059        #[allow(clippy::absurd_extreme_comparisons)]
20060        #[allow(unused_comparisons)]
20061        if __tmp.remaining() < Self::ENCODED_LEN {
20062            panic!(
20063                "buffer is too small (need {} bytes, but got {})",
20064                Self::ENCODED_LEN,
20065                __tmp.remaining(),
20066            )
20067        }
20068        __tmp.put_u32_le(self.time_boot_ms);
20069        __tmp.put_i32_le(self.value);
20070        for val in &self.name {
20071            __tmp.put_u8(*val);
20072        }
20073        if matches!(version, MavlinkVersion::V2) {
20074            let len = __tmp.len();
20075            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20076        } else {
20077            __tmp.len()
20078        }
20079    }
20080}
20081#[doc = "id: 62"]
20082#[doc = "The state of the navigation and position controller."]
20083#[derive(Debug, Clone, PartialEq)]
20084#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20085#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20086pub struct NAV_CONTROLLER_OUTPUT_DATA {
20087    #[doc = "Current desired roll"]
20088    pub nav_roll: f32,
20089    #[doc = "Current desired pitch"]
20090    pub nav_pitch: f32,
20091    #[doc = "Current altitude error"]
20092    pub alt_error: f32,
20093    #[doc = "Current airspeed error"]
20094    pub aspd_error: f32,
20095    #[doc = "Current crosstrack error on x-y plane"]
20096    pub xtrack_error: f32,
20097    #[doc = "Current desired heading"]
20098    pub nav_bearing: i16,
20099    #[doc = "Bearing to current waypoint/target"]
20100    pub target_bearing: i16,
20101    #[doc = "Distance to active waypoint"]
20102    pub wp_dist: u16,
20103}
20104impl NAV_CONTROLLER_OUTPUT_DATA {
20105    pub const ENCODED_LEN: usize = 26usize;
20106    pub const DEFAULT: Self = Self {
20107        nav_roll: 0.0_f32,
20108        nav_pitch: 0.0_f32,
20109        alt_error: 0.0_f32,
20110        aspd_error: 0.0_f32,
20111        xtrack_error: 0.0_f32,
20112        nav_bearing: 0_i16,
20113        target_bearing: 0_i16,
20114        wp_dist: 0_u16,
20115    };
20116    #[cfg(feature = "arbitrary")]
20117    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20118        use arbitrary::{Arbitrary, Unstructured};
20119        let mut buf = [0u8; 1024];
20120        rng.fill_bytes(&mut buf);
20121        let mut unstructured = Unstructured::new(&buf);
20122        Self::arbitrary(&mut unstructured).unwrap_or_default()
20123    }
20124}
20125impl Default for NAV_CONTROLLER_OUTPUT_DATA {
20126    fn default() -> Self {
20127        Self::DEFAULT.clone()
20128    }
20129}
20130impl MessageData for NAV_CONTROLLER_OUTPUT_DATA {
20131    type Message = MavMessage;
20132    const ID: u32 = 62u32;
20133    const NAME: &'static str = "NAV_CONTROLLER_OUTPUT";
20134    const EXTRA_CRC: u8 = 183u8;
20135    const ENCODED_LEN: usize = 26usize;
20136    fn deser(
20137        _version: MavlinkVersion,
20138        __input: &[u8],
20139    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20140        let avail_len = __input.len();
20141        let mut payload_buf = [0; Self::ENCODED_LEN];
20142        let mut buf = if avail_len < Self::ENCODED_LEN {
20143            payload_buf[0..avail_len].copy_from_slice(__input);
20144            Bytes::new(&payload_buf)
20145        } else {
20146            Bytes::new(__input)
20147        };
20148        let mut __struct = Self::default();
20149        __struct.nav_roll = buf.get_f32_le();
20150        __struct.nav_pitch = buf.get_f32_le();
20151        __struct.alt_error = buf.get_f32_le();
20152        __struct.aspd_error = buf.get_f32_le();
20153        __struct.xtrack_error = buf.get_f32_le();
20154        __struct.nav_bearing = buf.get_i16_le();
20155        __struct.target_bearing = buf.get_i16_le();
20156        __struct.wp_dist = buf.get_u16_le();
20157        Ok(__struct)
20158    }
20159    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20160        let mut __tmp = BytesMut::new(bytes);
20161        #[allow(clippy::absurd_extreme_comparisons)]
20162        #[allow(unused_comparisons)]
20163        if __tmp.remaining() < Self::ENCODED_LEN {
20164            panic!(
20165                "buffer is too small (need {} bytes, but got {})",
20166                Self::ENCODED_LEN,
20167                __tmp.remaining(),
20168            )
20169        }
20170        __tmp.put_f32_le(self.nav_roll);
20171        __tmp.put_f32_le(self.nav_pitch);
20172        __tmp.put_f32_le(self.alt_error);
20173        __tmp.put_f32_le(self.aspd_error);
20174        __tmp.put_f32_le(self.xtrack_error);
20175        __tmp.put_i16_le(self.nav_bearing);
20176        __tmp.put_i16_le(self.target_bearing);
20177        __tmp.put_u16_le(self.wp_dist);
20178        if matches!(version, MavlinkVersion::V2) {
20179            let len = __tmp.len();
20180            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20181        } else {
20182            __tmp.len()
20183        }
20184    }
20185}
20186#[doc = "id: 220"]
20187#[doc = "Accelerometer and Gyro biases from the navigation filter."]
20188#[derive(Debug, Clone, PartialEq)]
20189#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20190#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20191pub struct NAV_FILTER_BIAS_DATA {
20192    #[doc = "Timestamp (microseconds)"]
20193    pub usec: u64,
20194    #[doc = "b_f[0]"]
20195    pub accel_0: f32,
20196    #[doc = "b_f[1]"]
20197    pub accel_1: f32,
20198    #[doc = "b_f[2]"]
20199    pub accel_2: f32,
20200    #[doc = "b_f[0]"]
20201    pub gyro_0: f32,
20202    #[doc = "b_f[1]"]
20203    pub gyro_1: f32,
20204    #[doc = "b_f[2]"]
20205    pub gyro_2: f32,
20206}
20207impl NAV_FILTER_BIAS_DATA {
20208    pub const ENCODED_LEN: usize = 32usize;
20209    pub const DEFAULT: Self = Self {
20210        usec: 0_u64,
20211        accel_0: 0.0_f32,
20212        accel_1: 0.0_f32,
20213        accel_2: 0.0_f32,
20214        gyro_0: 0.0_f32,
20215        gyro_1: 0.0_f32,
20216        gyro_2: 0.0_f32,
20217    };
20218    #[cfg(feature = "arbitrary")]
20219    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20220        use arbitrary::{Arbitrary, Unstructured};
20221        let mut buf = [0u8; 1024];
20222        rng.fill_bytes(&mut buf);
20223        let mut unstructured = Unstructured::new(&buf);
20224        Self::arbitrary(&mut unstructured).unwrap_or_default()
20225    }
20226}
20227impl Default for NAV_FILTER_BIAS_DATA {
20228    fn default() -> Self {
20229        Self::DEFAULT.clone()
20230    }
20231}
20232impl MessageData for NAV_FILTER_BIAS_DATA {
20233    type Message = MavMessage;
20234    const ID: u32 = 220u32;
20235    const NAME: &'static str = "NAV_FILTER_BIAS";
20236    const EXTRA_CRC: u8 = 34u8;
20237    const ENCODED_LEN: usize = 32usize;
20238    fn deser(
20239        _version: MavlinkVersion,
20240        __input: &[u8],
20241    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20242        let avail_len = __input.len();
20243        let mut payload_buf = [0; Self::ENCODED_LEN];
20244        let mut buf = if avail_len < Self::ENCODED_LEN {
20245            payload_buf[0..avail_len].copy_from_slice(__input);
20246            Bytes::new(&payload_buf)
20247        } else {
20248            Bytes::new(__input)
20249        };
20250        let mut __struct = Self::default();
20251        __struct.usec = buf.get_u64_le();
20252        __struct.accel_0 = buf.get_f32_le();
20253        __struct.accel_1 = buf.get_f32_le();
20254        __struct.accel_2 = buf.get_f32_le();
20255        __struct.gyro_0 = buf.get_f32_le();
20256        __struct.gyro_1 = buf.get_f32_le();
20257        __struct.gyro_2 = buf.get_f32_le();
20258        Ok(__struct)
20259    }
20260    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20261        let mut __tmp = BytesMut::new(bytes);
20262        #[allow(clippy::absurd_extreme_comparisons)]
20263        #[allow(unused_comparisons)]
20264        if __tmp.remaining() < Self::ENCODED_LEN {
20265            panic!(
20266                "buffer is too small (need {} bytes, but got {})",
20267                Self::ENCODED_LEN,
20268                __tmp.remaining(),
20269            )
20270        }
20271        __tmp.put_u64_le(self.usec);
20272        __tmp.put_f32_le(self.accel_0);
20273        __tmp.put_f32_le(self.accel_1);
20274        __tmp.put_f32_le(self.accel_2);
20275        __tmp.put_f32_le(self.gyro_0);
20276        __tmp.put_f32_le(self.gyro_1);
20277        __tmp.put_f32_le(self.gyro_2);
20278        if matches!(version, MavlinkVersion::V2) {
20279            let len = __tmp.len();
20280            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20281        } else {
20282            __tmp.len()
20283        }
20284    }
20285}
20286#[doc = "id: 330"]
20287#[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
20288#[derive(Debug, Clone, PartialEq)]
20289#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20290#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20291pub struct OBSTACLE_DISTANCE_DATA {
20292    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
20293    pub time_usec: u64,
20294    #[doc = "Distance of obstacles around the vehicle with index 0 corresponding to north + angle_offset, unless otherwise specified in the frame. A value of 0 is valid and means that the obstacle is practically touching the sensor. A value of max_distance +1 means no obstacle is present. A value of UINT16_MAX for unknown/not used. In a array element, one unit corresponds to 1cm."]
20295    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20296    pub distances: [u16; 72],
20297    #[doc = "Minimum distance the sensor can measure."]
20298    pub min_distance: u16,
20299    #[doc = "Maximum distance the sensor can measure."]
20300    pub max_distance: u16,
20301    #[doc = "Class id of the distance sensor type."]
20302    pub sensor_type: MavDistanceSensor,
20303    #[doc = "Angular width in degrees of each array element. Increment direction is clockwise. This field is ignored if increment_f is non-zero."]
20304    pub increment: u8,
20305    #[doc = "Angular width in degrees of each array element as a float. If non-zero then this value is used instead of the uint8_t increment field. Positive is clockwise direction, negative is counter-clockwise."]
20306    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20307    pub increment_f: f32,
20308    #[doc = "Relative angle offset of the 0-index element in the distances array. Value of 0 corresponds to forward. Positive is clockwise direction, negative is counter-clockwise."]
20309    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20310    pub angle_offset: f32,
20311    #[doc = "Coordinate frame of reference for the yaw rotation and offset of the sensor data. Defaults to MAV_FRAME_GLOBAL, which is north aligned. For body-mounted sensors use MAV_FRAME_BODY_FRD, which is vehicle front aligned."]
20312    #[cfg_attr(feature = "serde", serde(default))]
20313    pub frame: MavFrame,
20314}
20315impl OBSTACLE_DISTANCE_DATA {
20316    pub const ENCODED_LEN: usize = 167usize;
20317    pub const DEFAULT: Self = Self {
20318        time_usec: 0_u64,
20319        distances: [0_u16; 72usize],
20320        min_distance: 0_u16,
20321        max_distance: 0_u16,
20322        sensor_type: MavDistanceSensor::DEFAULT,
20323        increment: 0_u8,
20324        increment_f: 0.0_f32,
20325        angle_offset: 0.0_f32,
20326        frame: MavFrame::DEFAULT,
20327    };
20328    #[cfg(feature = "arbitrary")]
20329    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20330        use arbitrary::{Arbitrary, Unstructured};
20331        let mut buf = [0u8; 1024];
20332        rng.fill_bytes(&mut buf);
20333        let mut unstructured = Unstructured::new(&buf);
20334        Self::arbitrary(&mut unstructured).unwrap_or_default()
20335    }
20336}
20337impl Default for OBSTACLE_DISTANCE_DATA {
20338    fn default() -> Self {
20339        Self::DEFAULT.clone()
20340    }
20341}
20342impl MessageData for OBSTACLE_DISTANCE_DATA {
20343    type Message = MavMessage;
20344    const ID: u32 = 330u32;
20345    const NAME: &'static str = "OBSTACLE_DISTANCE";
20346    const EXTRA_CRC: u8 = 23u8;
20347    const ENCODED_LEN: usize = 167usize;
20348    fn deser(
20349        _version: MavlinkVersion,
20350        __input: &[u8],
20351    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20352        let avail_len = __input.len();
20353        let mut payload_buf = [0; Self::ENCODED_LEN];
20354        let mut buf = if avail_len < Self::ENCODED_LEN {
20355            payload_buf[0..avail_len].copy_from_slice(__input);
20356            Bytes::new(&payload_buf)
20357        } else {
20358            Bytes::new(__input)
20359        };
20360        let mut __struct = Self::default();
20361        __struct.time_usec = buf.get_u64_le();
20362        for v in &mut __struct.distances {
20363            let val = buf.get_u16_le();
20364            *v = val;
20365        }
20366        __struct.min_distance = buf.get_u16_le();
20367        __struct.max_distance = buf.get_u16_le();
20368        let tmp = buf.get_u8();
20369        __struct.sensor_type =
20370            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20371                enum_type: "MavDistanceSensor",
20372                value: tmp as u32,
20373            })?;
20374        __struct.increment = buf.get_u8();
20375        __struct.increment_f = buf.get_f32_le();
20376        __struct.angle_offset = buf.get_f32_le();
20377        let tmp = buf.get_u8();
20378        __struct.frame =
20379            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20380                enum_type: "MavFrame",
20381                value: tmp as u32,
20382            })?;
20383        Ok(__struct)
20384    }
20385    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20386        let mut __tmp = BytesMut::new(bytes);
20387        #[allow(clippy::absurd_extreme_comparisons)]
20388        #[allow(unused_comparisons)]
20389        if __tmp.remaining() < Self::ENCODED_LEN {
20390            panic!(
20391                "buffer is too small (need {} bytes, but got {})",
20392                Self::ENCODED_LEN,
20393                __tmp.remaining(),
20394            )
20395        }
20396        __tmp.put_u64_le(self.time_usec);
20397        for val in &self.distances {
20398            __tmp.put_u16_le(*val);
20399        }
20400        __tmp.put_u16_le(self.min_distance);
20401        __tmp.put_u16_le(self.max_distance);
20402        __tmp.put_u8(self.sensor_type as u8);
20403        __tmp.put_u8(self.increment);
20404        __tmp.put_f32_le(self.increment_f);
20405        __tmp.put_f32_le(self.angle_offset);
20406        __tmp.put_u8(self.frame as u8);
20407        if matches!(version, MavlinkVersion::V2) {
20408            let len = __tmp.len();
20409            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20410        } else {
20411            __tmp.len()
20412        }
20413    }
20414}
20415#[doc = "id: 331"]
20416#[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
20417#[derive(Debug, Clone, PartialEq)]
20418#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20419#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20420pub struct ODOMETRY_DATA {
20421    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
20422    pub time_usec: u64,
20423    #[doc = "X Position"]
20424    pub x: f32,
20425    #[doc = "Y Position"]
20426    pub y: f32,
20427    #[doc = "Z Position"]
20428    pub z: f32,
20429    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
20430    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20431    pub q: [f32; 4],
20432    #[doc = "X linear speed"]
20433    pub vx: f32,
20434    #[doc = "Y linear speed"]
20435    pub vy: f32,
20436    #[doc = "Z linear speed"]
20437    pub vz: f32,
20438    #[doc = "Roll angular speed"]
20439    pub rollspeed: f32,
20440    #[doc = "Pitch angular speed"]
20441    pub pitchspeed: f32,
20442    #[doc = "Yaw angular speed"]
20443    pub yawspeed: f32,
20444    #[doc = "Row-major representation of a 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
20445    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20446    pub pose_covariance: [f32; 21],
20447    #[doc = "Row-major representation of a 6x6 velocity cross-covariance matrix upper right triangle (states: vx, vy, vz, rollspeed, pitchspeed, yawspeed; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
20448    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20449    pub velocity_covariance: [f32; 21],
20450    #[doc = "Coordinate frame of reference for the pose data."]
20451    pub frame_id: MavFrame,
20452    #[doc = "Coordinate frame of reference for the velocity in free space (twist) data."]
20453    pub child_frame_id: MavFrame,
20454    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
20455    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20456    pub reset_counter: u8,
20457    #[doc = "Type of estimator that is providing the odometry."]
20458    #[cfg_attr(feature = "serde", serde(default))]
20459    pub estimator_type: MavEstimatorType,
20460    #[doc = "Optional odometry quality metric as a percentage. -1 = odometry has failed, 0 = unknown/unset quality, 1 = worst quality, 100 = best quality"]
20461    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20462    pub quality: i8,
20463}
20464impl ODOMETRY_DATA {
20465    pub const ENCODED_LEN: usize = 233usize;
20466    pub const DEFAULT: Self = Self {
20467        time_usec: 0_u64,
20468        x: 0.0_f32,
20469        y: 0.0_f32,
20470        z: 0.0_f32,
20471        q: [0.0_f32; 4usize],
20472        vx: 0.0_f32,
20473        vy: 0.0_f32,
20474        vz: 0.0_f32,
20475        rollspeed: 0.0_f32,
20476        pitchspeed: 0.0_f32,
20477        yawspeed: 0.0_f32,
20478        pose_covariance: [0.0_f32; 21usize],
20479        velocity_covariance: [0.0_f32; 21usize],
20480        frame_id: MavFrame::DEFAULT,
20481        child_frame_id: MavFrame::DEFAULT,
20482        reset_counter: 0_u8,
20483        estimator_type: MavEstimatorType::DEFAULT,
20484        quality: 0_i8,
20485    };
20486    #[cfg(feature = "arbitrary")]
20487    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20488        use arbitrary::{Arbitrary, Unstructured};
20489        let mut buf = [0u8; 1024];
20490        rng.fill_bytes(&mut buf);
20491        let mut unstructured = Unstructured::new(&buf);
20492        Self::arbitrary(&mut unstructured).unwrap_or_default()
20493    }
20494}
20495impl Default for ODOMETRY_DATA {
20496    fn default() -> Self {
20497        Self::DEFAULT.clone()
20498    }
20499}
20500impl MessageData for ODOMETRY_DATA {
20501    type Message = MavMessage;
20502    const ID: u32 = 331u32;
20503    const NAME: &'static str = "ODOMETRY";
20504    const EXTRA_CRC: u8 = 91u8;
20505    const ENCODED_LEN: usize = 233usize;
20506    fn deser(
20507        _version: MavlinkVersion,
20508        __input: &[u8],
20509    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20510        let avail_len = __input.len();
20511        let mut payload_buf = [0; Self::ENCODED_LEN];
20512        let mut buf = if avail_len < Self::ENCODED_LEN {
20513            payload_buf[0..avail_len].copy_from_slice(__input);
20514            Bytes::new(&payload_buf)
20515        } else {
20516            Bytes::new(__input)
20517        };
20518        let mut __struct = Self::default();
20519        __struct.time_usec = buf.get_u64_le();
20520        __struct.x = buf.get_f32_le();
20521        __struct.y = buf.get_f32_le();
20522        __struct.z = buf.get_f32_le();
20523        for v in &mut __struct.q {
20524            let val = buf.get_f32_le();
20525            *v = val;
20526        }
20527        __struct.vx = buf.get_f32_le();
20528        __struct.vy = buf.get_f32_le();
20529        __struct.vz = buf.get_f32_le();
20530        __struct.rollspeed = buf.get_f32_le();
20531        __struct.pitchspeed = buf.get_f32_le();
20532        __struct.yawspeed = buf.get_f32_le();
20533        for v in &mut __struct.pose_covariance {
20534            let val = buf.get_f32_le();
20535            *v = val;
20536        }
20537        for v in &mut __struct.velocity_covariance {
20538            let val = buf.get_f32_le();
20539            *v = val;
20540        }
20541        let tmp = buf.get_u8();
20542        __struct.frame_id =
20543            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20544                enum_type: "MavFrame",
20545                value: tmp as u32,
20546            })?;
20547        let tmp = buf.get_u8();
20548        __struct.child_frame_id =
20549            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20550                enum_type: "MavFrame",
20551                value: tmp as u32,
20552            })?;
20553        __struct.reset_counter = buf.get_u8();
20554        let tmp = buf.get_u8();
20555        __struct.estimator_type =
20556            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20557                enum_type: "MavEstimatorType",
20558                value: tmp as u32,
20559            })?;
20560        __struct.quality = buf.get_i8();
20561        Ok(__struct)
20562    }
20563    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20564        let mut __tmp = BytesMut::new(bytes);
20565        #[allow(clippy::absurd_extreme_comparisons)]
20566        #[allow(unused_comparisons)]
20567        if __tmp.remaining() < Self::ENCODED_LEN {
20568            panic!(
20569                "buffer is too small (need {} bytes, but got {})",
20570                Self::ENCODED_LEN,
20571                __tmp.remaining(),
20572            )
20573        }
20574        __tmp.put_u64_le(self.time_usec);
20575        __tmp.put_f32_le(self.x);
20576        __tmp.put_f32_le(self.y);
20577        __tmp.put_f32_le(self.z);
20578        for val in &self.q {
20579            __tmp.put_f32_le(*val);
20580        }
20581        __tmp.put_f32_le(self.vx);
20582        __tmp.put_f32_le(self.vy);
20583        __tmp.put_f32_le(self.vz);
20584        __tmp.put_f32_le(self.rollspeed);
20585        __tmp.put_f32_le(self.pitchspeed);
20586        __tmp.put_f32_le(self.yawspeed);
20587        for val in &self.pose_covariance {
20588            __tmp.put_f32_le(*val);
20589        }
20590        for val in &self.velocity_covariance {
20591            __tmp.put_f32_le(*val);
20592        }
20593        __tmp.put_u8(self.frame_id as u8);
20594        __tmp.put_u8(self.child_frame_id as u8);
20595        __tmp.put_u8(self.reset_counter);
20596        __tmp.put_u8(self.estimator_type as u8);
20597        __tmp.put_i8(self.quality);
20598        if matches!(version, MavlinkVersion::V2) {
20599            let len = __tmp.len();
20600            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20601        } else {
20602            __tmp.len()
20603        }
20604    }
20605}
20606#[doc = "id: 390"]
20607#[doc = "Hardware status sent by an onboard computer."]
20608#[derive(Debug, Clone, PartialEq)]
20609#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20610#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20611pub struct ONBOARD_COMPUTER_STATUS_DATA {
20612    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
20613    pub time_usec: u64,
20614    #[doc = "Time since system boot."]
20615    pub uptime: u32,
20616    #[doc = "Amount of used RAM on the component system. A value of UINT32_MAX implies the field is unused."]
20617    pub ram_usage: u32,
20618    #[doc = "Total amount of RAM on the component system. A value of UINT32_MAX implies the field is unused."]
20619    pub ram_total: u32,
20620    #[doc = "Storage type: 0: HDD, 1: SSD, 2: EMMC, 3: SD card (non-removable), 4: SD card (removable). A value of UINT32_MAX implies the field is unused."]
20621    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20622    pub storage_type: [u32; 4],
20623    #[doc = "Amount of used storage space on the component system. A value of UINT32_MAX implies the field is unused."]
20624    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20625    pub storage_usage: [u32; 4],
20626    #[doc = "Total amount of storage space on the component system. A value of UINT32_MAX implies the field is unused."]
20627    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20628    pub storage_total: [u32; 4],
20629    #[doc = "Link type: 0-9: UART, 10-19: Wired network, 20-29: Wifi, 30-39: Point-to-point proprietary, 40-49: Mesh proprietary"]
20630    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20631    pub link_type: [u32; 6],
20632    #[doc = "Network traffic from the component system. A value of UINT32_MAX implies the field is unused."]
20633    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20634    pub link_tx_rate: [u32; 6],
20635    #[doc = "Network traffic to the component system. A value of UINT32_MAX implies the field is unused."]
20636    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20637    pub link_rx_rate: [u32; 6],
20638    #[doc = "Network capacity from the component system. A value of UINT32_MAX implies the field is unused."]
20639    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20640    pub link_tx_max: [u32; 6],
20641    #[doc = "Network capacity to the component system. A value of UINT32_MAX implies the field is unused."]
20642    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20643    pub link_rx_max: [u32; 6],
20644    #[doc = "Fan speeds. A value of INT16_MAX implies the field is unused."]
20645    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20646    pub fan_speed: [i16; 4],
20647    #[doc = "Type of the onboard computer: 0: Mission computer primary, 1: Mission computer backup 1, 2: Mission computer backup 2, 3: Compute node, 4-5: Compute spares, 6-9: Payload computers."]
20648    pub mavtype: u8,
20649    #[doc = "CPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
20650    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20651    pub cpu_cores: [u8; 8],
20652    #[doc = "Combined CPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
20653    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20654    pub cpu_combined: [u8; 10],
20655    #[doc = "GPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
20656    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20657    pub gpu_cores: [u8; 4],
20658    #[doc = "Combined GPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
20659    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20660    pub gpu_combined: [u8; 10],
20661    #[doc = "Temperature of the board. A value of INT8_MAX implies the field is unused."]
20662    pub temperature_board: i8,
20663    #[doc = "Temperature of the CPU core. A value of INT8_MAX implies the field is unused."]
20664    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20665    pub temperature_core: [i8; 8],
20666}
20667impl ONBOARD_COMPUTER_STATUS_DATA {
20668    pub const ENCODED_LEN: usize = 238usize;
20669    pub const DEFAULT: Self = Self {
20670        time_usec: 0_u64,
20671        uptime: 0_u32,
20672        ram_usage: 0_u32,
20673        ram_total: 0_u32,
20674        storage_type: [0_u32; 4usize],
20675        storage_usage: [0_u32; 4usize],
20676        storage_total: [0_u32; 4usize],
20677        link_type: [0_u32; 6usize],
20678        link_tx_rate: [0_u32; 6usize],
20679        link_rx_rate: [0_u32; 6usize],
20680        link_tx_max: [0_u32; 6usize],
20681        link_rx_max: [0_u32; 6usize],
20682        fan_speed: [0_i16; 4usize],
20683        mavtype: 0_u8,
20684        cpu_cores: [0_u8; 8usize],
20685        cpu_combined: [0_u8; 10usize],
20686        gpu_cores: [0_u8; 4usize],
20687        gpu_combined: [0_u8; 10usize],
20688        temperature_board: 0_i8,
20689        temperature_core: [0_i8; 8usize],
20690    };
20691    #[cfg(feature = "arbitrary")]
20692    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20693        use arbitrary::{Arbitrary, Unstructured};
20694        let mut buf = [0u8; 1024];
20695        rng.fill_bytes(&mut buf);
20696        let mut unstructured = Unstructured::new(&buf);
20697        Self::arbitrary(&mut unstructured).unwrap_or_default()
20698    }
20699}
20700impl Default for ONBOARD_COMPUTER_STATUS_DATA {
20701    fn default() -> Self {
20702        Self::DEFAULT.clone()
20703    }
20704}
20705impl MessageData for ONBOARD_COMPUTER_STATUS_DATA {
20706    type Message = MavMessage;
20707    const ID: u32 = 390u32;
20708    const NAME: &'static str = "ONBOARD_COMPUTER_STATUS";
20709    const EXTRA_CRC: u8 = 156u8;
20710    const ENCODED_LEN: usize = 238usize;
20711    fn deser(
20712        _version: MavlinkVersion,
20713        __input: &[u8],
20714    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20715        let avail_len = __input.len();
20716        let mut payload_buf = [0; Self::ENCODED_LEN];
20717        let mut buf = if avail_len < Self::ENCODED_LEN {
20718            payload_buf[0..avail_len].copy_from_slice(__input);
20719            Bytes::new(&payload_buf)
20720        } else {
20721            Bytes::new(__input)
20722        };
20723        let mut __struct = Self::default();
20724        __struct.time_usec = buf.get_u64_le();
20725        __struct.uptime = buf.get_u32_le();
20726        __struct.ram_usage = buf.get_u32_le();
20727        __struct.ram_total = buf.get_u32_le();
20728        for v in &mut __struct.storage_type {
20729            let val = buf.get_u32_le();
20730            *v = val;
20731        }
20732        for v in &mut __struct.storage_usage {
20733            let val = buf.get_u32_le();
20734            *v = val;
20735        }
20736        for v in &mut __struct.storage_total {
20737            let val = buf.get_u32_le();
20738            *v = val;
20739        }
20740        for v in &mut __struct.link_type {
20741            let val = buf.get_u32_le();
20742            *v = val;
20743        }
20744        for v in &mut __struct.link_tx_rate {
20745            let val = buf.get_u32_le();
20746            *v = val;
20747        }
20748        for v in &mut __struct.link_rx_rate {
20749            let val = buf.get_u32_le();
20750            *v = val;
20751        }
20752        for v in &mut __struct.link_tx_max {
20753            let val = buf.get_u32_le();
20754            *v = val;
20755        }
20756        for v in &mut __struct.link_rx_max {
20757            let val = buf.get_u32_le();
20758            *v = val;
20759        }
20760        for v in &mut __struct.fan_speed {
20761            let val = buf.get_i16_le();
20762            *v = val;
20763        }
20764        __struct.mavtype = buf.get_u8();
20765        for v in &mut __struct.cpu_cores {
20766            let val = buf.get_u8();
20767            *v = val;
20768        }
20769        for v in &mut __struct.cpu_combined {
20770            let val = buf.get_u8();
20771            *v = val;
20772        }
20773        for v in &mut __struct.gpu_cores {
20774            let val = buf.get_u8();
20775            *v = val;
20776        }
20777        for v in &mut __struct.gpu_combined {
20778            let val = buf.get_u8();
20779            *v = val;
20780        }
20781        __struct.temperature_board = buf.get_i8();
20782        for v in &mut __struct.temperature_core {
20783            let val = buf.get_i8();
20784            *v = val;
20785        }
20786        Ok(__struct)
20787    }
20788    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20789        let mut __tmp = BytesMut::new(bytes);
20790        #[allow(clippy::absurd_extreme_comparisons)]
20791        #[allow(unused_comparisons)]
20792        if __tmp.remaining() < Self::ENCODED_LEN {
20793            panic!(
20794                "buffer is too small (need {} bytes, but got {})",
20795                Self::ENCODED_LEN,
20796                __tmp.remaining(),
20797            )
20798        }
20799        __tmp.put_u64_le(self.time_usec);
20800        __tmp.put_u32_le(self.uptime);
20801        __tmp.put_u32_le(self.ram_usage);
20802        __tmp.put_u32_le(self.ram_total);
20803        for val in &self.storage_type {
20804            __tmp.put_u32_le(*val);
20805        }
20806        for val in &self.storage_usage {
20807            __tmp.put_u32_le(*val);
20808        }
20809        for val in &self.storage_total {
20810            __tmp.put_u32_le(*val);
20811        }
20812        for val in &self.link_type {
20813            __tmp.put_u32_le(*val);
20814        }
20815        for val in &self.link_tx_rate {
20816            __tmp.put_u32_le(*val);
20817        }
20818        for val in &self.link_rx_rate {
20819            __tmp.put_u32_le(*val);
20820        }
20821        for val in &self.link_tx_max {
20822            __tmp.put_u32_le(*val);
20823        }
20824        for val in &self.link_rx_max {
20825            __tmp.put_u32_le(*val);
20826        }
20827        for val in &self.fan_speed {
20828            __tmp.put_i16_le(*val);
20829        }
20830        __tmp.put_u8(self.mavtype);
20831        for val in &self.cpu_cores {
20832            __tmp.put_u8(*val);
20833        }
20834        for val in &self.cpu_combined {
20835            __tmp.put_u8(*val);
20836        }
20837        for val in &self.gpu_cores {
20838            __tmp.put_u8(*val);
20839        }
20840        for val in &self.gpu_combined {
20841            __tmp.put_u8(*val);
20842        }
20843        __tmp.put_i8(self.temperature_board);
20844        for val in &self.temperature_core {
20845            __tmp.put_i8(*val);
20846        }
20847        if matches!(version, MavlinkVersion::V2) {
20848            let len = __tmp.len();
20849            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20850        } else {
20851            __tmp.len()
20852        }
20853    }
20854}
20855#[doc = "id: 12918"]
20856#[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
20857#[derive(Debug, Clone, PartialEq)]
20858#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20859#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20860pub struct OPEN_DRONE_ID_ARM_STATUS_DATA {
20861    #[doc = "Status level indicating if arming is allowed."]
20862    pub status: MavOdidArmStatus,
20863    #[doc = "Text error message, should be empty if status is good to arm. Fill with nulls in unused portion."]
20864    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20865    pub error: [u8; 50],
20866}
20867impl OPEN_DRONE_ID_ARM_STATUS_DATA {
20868    pub const ENCODED_LEN: usize = 51usize;
20869    pub const DEFAULT: Self = Self {
20870        status: MavOdidArmStatus::DEFAULT,
20871        error: [0_u8; 50usize],
20872    };
20873    #[cfg(feature = "arbitrary")]
20874    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20875        use arbitrary::{Arbitrary, Unstructured};
20876        let mut buf = [0u8; 1024];
20877        rng.fill_bytes(&mut buf);
20878        let mut unstructured = Unstructured::new(&buf);
20879        Self::arbitrary(&mut unstructured).unwrap_or_default()
20880    }
20881}
20882impl Default for OPEN_DRONE_ID_ARM_STATUS_DATA {
20883    fn default() -> Self {
20884        Self::DEFAULT.clone()
20885    }
20886}
20887impl MessageData for OPEN_DRONE_ID_ARM_STATUS_DATA {
20888    type Message = MavMessage;
20889    const ID: u32 = 12918u32;
20890    const NAME: &'static str = "OPEN_DRONE_ID_ARM_STATUS";
20891    const EXTRA_CRC: u8 = 139u8;
20892    const ENCODED_LEN: usize = 51usize;
20893    fn deser(
20894        _version: MavlinkVersion,
20895        __input: &[u8],
20896    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20897        let avail_len = __input.len();
20898        let mut payload_buf = [0; Self::ENCODED_LEN];
20899        let mut buf = if avail_len < Self::ENCODED_LEN {
20900            payload_buf[0..avail_len].copy_from_slice(__input);
20901            Bytes::new(&payload_buf)
20902        } else {
20903            Bytes::new(__input)
20904        };
20905        let mut __struct = Self::default();
20906        let tmp = buf.get_u8();
20907        __struct.status =
20908            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20909                enum_type: "MavOdidArmStatus",
20910                value: tmp as u32,
20911            })?;
20912        for v in &mut __struct.error {
20913            let val = buf.get_u8();
20914            *v = val;
20915        }
20916        Ok(__struct)
20917    }
20918    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20919        let mut __tmp = BytesMut::new(bytes);
20920        #[allow(clippy::absurd_extreme_comparisons)]
20921        #[allow(unused_comparisons)]
20922        if __tmp.remaining() < Self::ENCODED_LEN {
20923            panic!(
20924                "buffer is too small (need {} bytes, but got {})",
20925                Self::ENCODED_LEN,
20926                __tmp.remaining(),
20927            )
20928        }
20929        __tmp.put_u8(self.status as u8);
20930        for val in &self.error {
20931            __tmp.put_u8(*val);
20932        }
20933        if matches!(version, MavlinkVersion::V2) {
20934            let len = __tmp.len();
20935            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20936        } else {
20937            __tmp.len()
20938        }
20939    }
20940}
20941#[doc = "id: 12902"]
20942#[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
20943#[derive(Debug, Clone, PartialEq)]
20944#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20945#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20946pub struct OPEN_DRONE_ID_AUTHENTICATION_DATA {
20947    #[doc = "This field is only present for page 0. 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
20948    pub timestamp: u32,
20949    #[doc = "System ID (0 for broadcast)."]
20950    pub target_system: u8,
20951    #[doc = "Component ID (0 for broadcast)."]
20952    pub target_component: u8,
20953    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
20954    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20955    pub id_or_mac: [u8; 20],
20956    #[doc = "Indicates the type of authentication."]
20957    pub authentication_type: MavOdidAuthType,
20958    #[doc = "Allowed range is 0 - 15."]
20959    pub data_page: u8,
20960    #[doc = "This field is only present for page 0. Allowed range is 0 - 15. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
20961    pub last_page_index: u8,
20962    #[doc = "This field is only present for page 0. Total bytes of authentication_data from all data pages. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
20963    pub length: u8,
20964    #[doc = "Opaque authentication data. For page 0, the size is only 17 bytes. For other pages, the size is 23 bytes. Shall be filled with nulls in the unused portion of the field."]
20965    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20966    pub authentication_data: [u8; 23],
20967}
20968impl OPEN_DRONE_ID_AUTHENTICATION_DATA {
20969    pub const ENCODED_LEN: usize = 53usize;
20970    pub const DEFAULT: Self = Self {
20971        timestamp: 0_u32,
20972        target_system: 0_u8,
20973        target_component: 0_u8,
20974        id_or_mac: [0_u8; 20usize],
20975        authentication_type: MavOdidAuthType::DEFAULT,
20976        data_page: 0_u8,
20977        last_page_index: 0_u8,
20978        length: 0_u8,
20979        authentication_data: [0_u8; 23usize],
20980    };
20981    #[cfg(feature = "arbitrary")]
20982    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20983        use arbitrary::{Arbitrary, Unstructured};
20984        let mut buf = [0u8; 1024];
20985        rng.fill_bytes(&mut buf);
20986        let mut unstructured = Unstructured::new(&buf);
20987        Self::arbitrary(&mut unstructured).unwrap_or_default()
20988    }
20989}
20990impl Default for OPEN_DRONE_ID_AUTHENTICATION_DATA {
20991    fn default() -> Self {
20992        Self::DEFAULT.clone()
20993    }
20994}
20995impl MessageData for OPEN_DRONE_ID_AUTHENTICATION_DATA {
20996    type Message = MavMessage;
20997    const ID: u32 = 12902u32;
20998    const NAME: &'static str = "OPEN_DRONE_ID_AUTHENTICATION";
20999    const EXTRA_CRC: u8 = 140u8;
21000    const ENCODED_LEN: usize = 53usize;
21001    fn deser(
21002        _version: MavlinkVersion,
21003        __input: &[u8],
21004    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21005        let avail_len = __input.len();
21006        let mut payload_buf = [0; Self::ENCODED_LEN];
21007        let mut buf = if avail_len < Self::ENCODED_LEN {
21008            payload_buf[0..avail_len].copy_from_slice(__input);
21009            Bytes::new(&payload_buf)
21010        } else {
21011            Bytes::new(__input)
21012        };
21013        let mut __struct = Self::default();
21014        __struct.timestamp = buf.get_u32_le();
21015        __struct.target_system = buf.get_u8();
21016        __struct.target_component = buf.get_u8();
21017        for v in &mut __struct.id_or_mac {
21018            let val = buf.get_u8();
21019            *v = val;
21020        }
21021        let tmp = buf.get_u8();
21022        __struct.authentication_type =
21023            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21024                enum_type: "MavOdidAuthType",
21025                value: tmp as u32,
21026            })?;
21027        __struct.data_page = buf.get_u8();
21028        __struct.last_page_index = buf.get_u8();
21029        __struct.length = buf.get_u8();
21030        for v in &mut __struct.authentication_data {
21031            let val = buf.get_u8();
21032            *v = val;
21033        }
21034        Ok(__struct)
21035    }
21036    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21037        let mut __tmp = BytesMut::new(bytes);
21038        #[allow(clippy::absurd_extreme_comparisons)]
21039        #[allow(unused_comparisons)]
21040        if __tmp.remaining() < Self::ENCODED_LEN {
21041            panic!(
21042                "buffer is too small (need {} bytes, but got {})",
21043                Self::ENCODED_LEN,
21044                __tmp.remaining(),
21045            )
21046        }
21047        __tmp.put_u32_le(self.timestamp);
21048        __tmp.put_u8(self.target_system);
21049        __tmp.put_u8(self.target_component);
21050        for val in &self.id_or_mac {
21051            __tmp.put_u8(*val);
21052        }
21053        __tmp.put_u8(self.authentication_type as u8);
21054        __tmp.put_u8(self.data_page);
21055        __tmp.put_u8(self.last_page_index);
21056        __tmp.put_u8(self.length);
21057        for val in &self.authentication_data {
21058            __tmp.put_u8(*val);
21059        }
21060        if matches!(version, MavlinkVersion::V2) {
21061            let len = __tmp.len();
21062            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21063        } else {
21064            __tmp.len()
21065        }
21066    }
21067}
21068#[doc = "id: 12900"]
21069#[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
21070#[derive(Debug, Clone, PartialEq)]
21071#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21072#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21073pub struct OPEN_DRONE_ID_BASIC_ID_DATA {
21074    #[doc = "System ID (0 for broadcast)."]
21075    pub target_system: u8,
21076    #[doc = "Component ID (0 for broadcast)."]
21077    pub target_component: u8,
21078    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21079    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21080    pub id_or_mac: [u8; 20],
21081    #[doc = "Indicates the format for the uas_id field of this message."]
21082    pub id_type: MavOdidIdType,
21083    #[doc = "Indicates the type of UA (Unmanned Aircraft)."]
21084    pub ua_type: MavOdidUaType,
21085    #[doc = "UAS (Unmanned Aircraft System) ID following the format specified by id_type. Shall be filled with nulls in the unused portion of the field."]
21086    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21087    pub uas_id: [u8; 20],
21088}
21089impl OPEN_DRONE_ID_BASIC_ID_DATA {
21090    pub const ENCODED_LEN: usize = 44usize;
21091    pub const DEFAULT: Self = Self {
21092        target_system: 0_u8,
21093        target_component: 0_u8,
21094        id_or_mac: [0_u8; 20usize],
21095        id_type: MavOdidIdType::DEFAULT,
21096        ua_type: MavOdidUaType::DEFAULT,
21097        uas_id: [0_u8; 20usize],
21098    };
21099    #[cfg(feature = "arbitrary")]
21100    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21101        use arbitrary::{Arbitrary, Unstructured};
21102        let mut buf = [0u8; 1024];
21103        rng.fill_bytes(&mut buf);
21104        let mut unstructured = Unstructured::new(&buf);
21105        Self::arbitrary(&mut unstructured).unwrap_or_default()
21106    }
21107}
21108impl Default for OPEN_DRONE_ID_BASIC_ID_DATA {
21109    fn default() -> Self {
21110        Self::DEFAULT.clone()
21111    }
21112}
21113impl MessageData for OPEN_DRONE_ID_BASIC_ID_DATA {
21114    type Message = MavMessage;
21115    const ID: u32 = 12900u32;
21116    const NAME: &'static str = "OPEN_DRONE_ID_BASIC_ID";
21117    const EXTRA_CRC: u8 = 114u8;
21118    const ENCODED_LEN: usize = 44usize;
21119    fn deser(
21120        _version: MavlinkVersion,
21121        __input: &[u8],
21122    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21123        let avail_len = __input.len();
21124        let mut payload_buf = [0; Self::ENCODED_LEN];
21125        let mut buf = if avail_len < Self::ENCODED_LEN {
21126            payload_buf[0..avail_len].copy_from_slice(__input);
21127            Bytes::new(&payload_buf)
21128        } else {
21129            Bytes::new(__input)
21130        };
21131        let mut __struct = Self::default();
21132        __struct.target_system = buf.get_u8();
21133        __struct.target_component = buf.get_u8();
21134        for v in &mut __struct.id_or_mac {
21135            let val = buf.get_u8();
21136            *v = val;
21137        }
21138        let tmp = buf.get_u8();
21139        __struct.id_type =
21140            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21141                enum_type: "MavOdidIdType",
21142                value: tmp as u32,
21143            })?;
21144        let tmp = buf.get_u8();
21145        __struct.ua_type =
21146            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21147                enum_type: "MavOdidUaType",
21148                value: tmp as u32,
21149            })?;
21150        for v in &mut __struct.uas_id {
21151            let val = buf.get_u8();
21152            *v = val;
21153        }
21154        Ok(__struct)
21155    }
21156    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21157        let mut __tmp = BytesMut::new(bytes);
21158        #[allow(clippy::absurd_extreme_comparisons)]
21159        #[allow(unused_comparisons)]
21160        if __tmp.remaining() < Self::ENCODED_LEN {
21161            panic!(
21162                "buffer is too small (need {} bytes, but got {})",
21163                Self::ENCODED_LEN,
21164                __tmp.remaining(),
21165            )
21166        }
21167        __tmp.put_u8(self.target_system);
21168        __tmp.put_u8(self.target_component);
21169        for val in &self.id_or_mac {
21170            __tmp.put_u8(*val);
21171        }
21172        __tmp.put_u8(self.id_type as u8);
21173        __tmp.put_u8(self.ua_type as u8);
21174        for val in &self.uas_id {
21175            __tmp.put_u8(*val);
21176        }
21177        if matches!(version, MavlinkVersion::V2) {
21178            let len = __tmp.len();
21179            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21180        } else {
21181            __tmp.len()
21182        }
21183    }
21184}
21185#[doc = "id: 12901"]
21186#[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
21187#[derive(Debug, Clone, PartialEq)]
21188#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21189#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21190pub struct OPEN_DRONE_ID_LOCATION_DATA {
21191    #[doc = "Current latitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
21192    pub latitude: i32,
21193    #[doc = "Current longitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
21194    pub longitude: i32,
21195    #[doc = "The altitude calculated from the barometric pressue. Reference is against 29.92inHg or 1013.2mb. If unknown: -1000 m."]
21196    pub altitude_barometric: f32,
21197    #[doc = "The geodetic altitude as defined by WGS84. If unknown: -1000 m."]
21198    pub altitude_geodetic: f32,
21199    #[doc = "The current height of the unmanned aircraft above the take-off location or the ground as indicated by height_reference. If unknown: -1000 m."]
21200    pub height: f32,
21201    #[doc = "Seconds after the full hour with reference to UTC time. Typically the GPS outputs a time-of-week value in milliseconds. First convert that to UTC and then convert for this field using ((float) (time_week_ms % (60*60*1000))) / 1000. If unknown: 0xFFFF."]
21202    pub timestamp: f32,
21203    #[doc = "Direction over ground (not heading, but direction of movement) measured clockwise from true North: 0 - 35999 centi-degrees. If unknown: 36100 centi-degrees."]
21204    pub direction: u16,
21205    #[doc = "Ground speed. Positive only. If unknown: 25500 cm/s. If speed is larger than 25425 cm/s, use 25425 cm/s."]
21206    pub speed_horizontal: u16,
21207    #[doc = "The vertical speed. Up is positive. If unknown: 6300 cm/s. If speed is larger than 6200 cm/s, use 6200 cm/s. If lower than -6200 cm/s, use -6200 cm/s."]
21208    pub speed_vertical: i16,
21209    #[doc = "System ID (0 for broadcast)."]
21210    pub target_system: u8,
21211    #[doc = "Component ID (0 for broadcast)."]
21212    pub target_component: u8,
21213    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21214    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21215    pub id_or_mac: [u8; 20],
21216    #[doc = "Indicates whether the unmanned aircraft is on the ground or in the air."]
21217    pub status: MavOdidStatus,
21218    #[doc = "Indicates the reference point for the height field."]
21219    pub height_reference: MavOdidHeightRef,
21220    #[doc = "The accuracy of the horizontal position."]
21221    pub horizontal_accuracy: MavOdidHorAcc,
21222    #[doc = "The accuracy of the vertical position."]
21223    pub vertical_accuracy: MavOdidVerAcc,
21224    #[doc = "The accuracy of the barometric altitude."]
21225    pub barometer_accuracy: MavOdidVerAcc,
21226    #[doc = "The accuracy of the horizontal and vertical speed."]
21227    pub speed_accuracy: MavOdidSpeedAcc,
21228    #[doc = "The accuracy of the timestamps."]
21229    pub timestamp_accuracy: MavOdidTimeAcc,
21230}
21231impl OPEN_DRONE_ID_LOCATION_DATA {
21232    pub const ENCODED_LEN: usize = 59usize;
21233    pub const DEFAULT: Self = Self {
21234        latitude: 0_i32,
21235        longitude: 0_i32,
21236        altitude_barometric: 0.0_f32,
21237        altitude_geodetic: 0.0_f32,
21238        height: 0.0_f32,
21239        timestamp: 0.0_f32,
21240        direction: 0_u16,
21241        speed_horizontal: 0_u16,
21242        speed_vertical: 0_i16,
21243        target_system: 0_u8,
21244        target_component: 0_u8,
21245        id_or_mac: [0_u8; 20usize],
21246        status: MavOdidStatus::DEFAULT,
21247        height_reference: MavOdidHeightRef::DEFAULT,
21248        horizontal_accuracy: MavOdidHorAcc::DEFAULT,
21249        vertical_accuracy: MavOdidVerAcc::DEFAULT,
21250        barometer_accuracy: MavOdidVerAcc::DEFAULT,
21251        speed_accuracy: MavOdidSpeedAcc::DEFAULT,
21252        timestamp_accuracy: MavOdidTimeAcc::DEFAULT,
21253    };
21254    #[cfg(feature = "arbitrary")]
21255    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21256        use arbitrary::{Arbitrary, Unstructured};
21257        let mut buf = [0u8; 1024];
21258        rng.fill_bytes(&mut buf);
21259        let mut unstructured = Unstructured::new(&buf);
21260        Self::arbitrary(&mut unstructured).unwrap_or_default()
21261    }
21262}
21263impl Default for OPEN_DRONE_ID_LOCATION_DATA {
21264    fn default() -> Self {
21265        Self::DEFAULT.clone()
21266    }
21267}
21268impl MessageData for OPEN_DRONE_ID_LOCATION_DATA {
21269    type Message = MavMessage;
21270    const ID: u32 = 12901u32;
21271    const NAME: &'static str = "OPEN_DRONE_ID_LOCATION";
21272    const EXTRA_CRC: u8 = 254u8;
21273    const ENCODED_LEN: usize = 59usize;
21274    fn deser(
21275        _version: MavlinkVersion,
21276        __input: &[u8],
21277    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21278        let avail_len = __input.len();
21279        let mut payload_buf = [0; Self::ENCODED_LEN];
21280        let mut buf = if avail_len < Self::ENCODED_LEN {
21281            payload_buf[0..avail_len].copy_from_slice(__input);
21282            Bytes::new(&payload_buf)
21283        } else {
21284            Bytes::new(__input)
21285        };
21286        let mut __struct = Self::default();
21287        __struct.latitude = buf.get_i32_le();
21288        __struct.longitude = buf.get_i32_le();
21289        __struct.altitude_barometric = buf.get_f32_le();
21290        __struct.altitude_geodetic = buf.get_f32_le();
21291        __struct.height = buf.get_f32_le();
21292        __struct.timestamp = buf.get_f32_le();
21293        __struct.direction = buf.get_u16_le();
21294        __struct.speed_horizontal = buf.get_u16_le();
21295        __struct.speed_vertical = buf.get_i16_le();
21296        __struct.target_system = buf.get_u8();
21297        __struct.target_component = buf.get_u8();
21298        for v in &mut __struct.id_or_mac {
21299            let val = buf.get_u8();
21300            *v = val;
21301        }
21302        let tmp = buf.get_u8();
21303        __struct.status =
21304            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21305                enum_type: "MavOdidStatus",
21306                value: tmp as u32,
21307            })?;
21308        let tmp = buf.get_u8();
21309        __struct.height_reference =
21310            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21311                enum_type: "MavOdidHeightRef",
21312                value: tmp as u32,
21313            })?;
21314        let tmp = buf.get_u8();
21315        __struct.horizontal_accuracy =
21316            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21317                enum_type: "MavOdidHorAcc",
21318                value: tmp as u32,
21319            })?;
21320        let tmp = buf.get_u8();
21321        __struct.vertical_accuracy =
21322            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21323                enum_type: "MavOdidVerAcc",
21324                value: tmp as u32,
21325            })?;
21326        let tmp = buf.get_u8();
21327        __struct.barometer_accuracy =
21328            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21329                enum_type: "MavOdidVerAcc",
21330                value: tmp as u32,
21331            })?;
21332        let tmp = buf.get_u8();
21333        __struct.speed_accuracy =
21334            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21335                enum_type: "MavOdidSpeedAcc",
21336                value: tmp as u32,
21337            })?;
21338        let tmp = buf.get_u8();
21339        __struct.timestamp_accuracy =
21340            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21341                enum_type: "MavOdidTimeAcc",
21342                value: tmp as u32,
21343            })?;
21344        Ok(__struct)
21345    }
21346    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21347        let mut __tmp = BytesMut::new(bytes);
21348        #[allow(clippy::absurd_extreme_comparisons)]
21349        #[allow(unused_comparisons)]
21350        if __tmp.remaining() < Self::ENCODED_LEN {
21351            panic!(
21352                "buffer is too small (need {} bytes, but got {})",
21353                Self::ENCODED_LEN,
21354                __tmp.remaining(),
21355            )
21356        }
21357        __tmp.put_i32_le(self.latitude);
21358        __tmp.put_i32_le(self.longitude);
21359        __tmp.put_f32_le(self.altitude_barometric);
21360        __tmp.put_f32_le(self.altitude_geodetic);
21361        __tmp.put_f32_le(self.height);
21362        __tmp.put_f32_le(self.timestamp);
21363        __tmp.put_u16_le(self.direction);
21364        __tmp.put_u16_le(self.speed_horizontal);
21365        __tmp.put_i16_le(self.speed_vertical);
21366        __tmp.put_u8(self.target_system);
21367        __tmp.put_u8(self.target_component);
21368        for val in &self.id_or_mac {
21369            __tmp.put_u8(*val);
21370        }
21371        __tmp.put_u8(self.status as u8);
21372        __tmp.put_u8(self.height_reference as u8);
21373        __tmp.put_u8(self.horizontal_accuracy as u8);
21374        __tmp.put_u8(self.vertical_accuracy as u8);
21375        __tmp.put_u8(self.barometer_accuracy as u8);
21376        __tmp.put_u8(self.speed_accuracy as u8);
21377        __tmp.put_u8(self.timestamp_accuracy as u8);
21378        if matches!(version, MavlinkVersion::V2) {
21379            let len = __tmp.len();
21380            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21381        } else {
21382            __tmp.len()
21383        }
21384    }
21385}
21386#[doc = "id: 12915"]
21387#[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
21388#[derive(Debug, Clone, PartialEq)]
21389#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21390#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21391pub struct OPEN_DRONE_ID_MESSAGE_PACK_DATA {
21392    #[doc = "System ID (0 for broadcast)."]
21393    pub target_system: u8,
21394    #[doc = "Component ID (0 for broadcast)."]
21395    pub target_component: u8,
21396    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21397    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21398    pub id_or_mac: [u8; 20],
21399    #[doc = "This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length."]
21400    pub single_message_size: u8,
21401    #[doc = "Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9."]
21402    pub msg_pack_size: u8,
21403    #[doc = "Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field."]
21404    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21405    pub messages: [u8; 225],
21406}
21407impl OPEN_DRONE_ID_MESSAGE_PACK_DATA {
21408    pub const ENCODED_LEN: usize = 249usize;
21409    pub const DEFAULT: Self = Self {
21410        target_system: 0_u8,
21411        target_component: 0_u8,
21412        id_or_mac: [0_u8; 20usize],
21413        single_message_size: 0_u8,
21414        msg_pack_size: 0_u8,
21415        messages: [0_u8; 225usize],
21416    };
21417    #[cfg(feature = "arbitrary")]
21418    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21419        use arbitrary::{Arbitrary, Unstructured};
21420        let mut buf = [0u8; 1024];
21421        rng.fill_bytes(&mut buf);
21422        let mut unstructured = Unstructured::new(&buf);
21423        Self::arbitrary(&mut unstructured).unwrap_or_default()
21424    }
21425}
21426impl Default for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
21427    fn default() -> Self {
21428        Self::DEFAULT.clone()
21429    }
21430}
21431impl MessageData for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
21432    type Message = MavMessage;
21433    const ID: u32 = 12915u32;
21434    const NAME: &'static str = "OPEN_DRONE_ID_MESSAGE_PACK";
21435    const EXTRA_CRC: u8 = 94u8;
21436    const ENCODED_LEN: usize = 249usize;
21437    fn deser(
21438        _version: MavlinkVersion,
21439        __input: &[u8],
21440    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21441        let avail_len = __input.len();
21442        let mut payload_buf = [0; Self::ENCODED_LEN];
21443        let mut buf = if avail_len < Self::ENCODED_LEN {
21444            payload_buf[0..avail_len].copy_from_slice(__input);
21445            Bytes::new(&payload_buf)
21446        } else {
21447            Bytes::new(__input)
21448        };
21449        let mut __struct = Self::default();
21450        __struct.target_system = buf.get_u8();
21451        __struct.target_component = buf.get_u8();
21452        for v in &mut __struct.id_or_mac {
21453            let val = buf.get_u8();
21454            *v = val;
21455        }
21456        __struct.single_message_size = buf.get_u8();
21457        __struct.msg_pack_size = buf.get_u8();
21458        for v in &mut __struct.messages {
21459            let val = buf.get_u8();
21460            *v = val;
21461        }
21462        Ok(__struct)
21463    }
21464    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21465        let mut __tmp = BytesMut::new(bytes);
21466        #[allow(clippy::absurd_extreme_comparisons)]
21467        #[allow(unused_comparisons)]
21468        if __tmp.remaining() < Self::ENCODED_LEN {
21469            panic!(
21470                "buffer is too small (need {} bytes, but got {})",
21471                Self::ENCODED_LEN,
21472                __tmp.remaining(),
21473            )
21474        }
21475        __tmp.put_u8(self.target_system);
21476        __tmp.put_u8(self.target_component);
21477        for val in &self.id_or_mac {
21478            __tmp.put_u8(*val);
21479        }
21480        __tmp.put_u8(self.single_message_size);
21481        __tmp.put_u8(self.msg_pack_size);
21482        for val in &self.messages {
21483            __tmp.put_u8(*val);
21484        }
21485        if matches!(version, MavlinkVersion::V2) {
21486            let len = __tmp.len();
21487            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21488        } else {
21489            __tmp.len()
21490        }
21491    }
21492}
21493#[doc = "id: 12905"]
21494#[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
21495#[derive(Debug, Clone, PartialEq)]
21496#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21497#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21498pub struct OPEN_DRONE_ID_OPERATOR_ID_DATA {
21499    #[doc = "System ID (0 for broadcast)."]
21500    pub target_system: u8,
21501    #[doc = "Component ID (0 for broadcast)."]
21502    pub target_component: u8,
21503    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21504    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21505    pub id_or_mac: [u8; 20],
21506    #[doc = "Indicates the type of the operator_id field."]
21507    pub operator_id_type: MavOdidOperatorIdType,
21508    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
21509    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21510    pub operator_id: [u8; 20],
21511}
21512impl OPEN_DRONE_ID_OPERATOR_ID_DATA {
21513    pub const ENCODED_LEN: usize = 43usize;
21514    pub const DEFAULT: Self = Self {
21515        target_system: 0_u8,
21516        target_component: 0_u8,
21517        id_or_mac: [0_u8; 20usize],
21518        operator_id_type: MavOdidOperatorIdType::DEFAULT,
21519        operator_id: [0_u8; 20usize],
21520    };
21521    #[cfg(feature = "arbitrary")]
21522    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21523        use arbitrary::{Arbitrary, Unstructured};
21524        let mut buf = [0u8; 1024];
21525        rng.fill_bytes(&mut buf);
21526        let mut unstructured = Unstructured::new(&buf);
21527        Self::arbitrary(&mut unstructured).unwrap_or_default()
21528    }
21529}
21530impl Default for OPEN_DRONE_ID_OPERATOR_ID_DATA {
21531    fn default() -> Self {
21532        Self::DEFAULT.clone()
21533    }
21534}
21535impl MessageData for OPEN_DRONE_ID_OPERATOR_ID_DATA {
21536    type Message = MavMessage;
21537    const ID: u32 = 12905u32;
21538    const NAME: &'static str = "OPEN_DRONE_ID_OPERATOR_ID";
21539    const EXTRA_CRC: u8 = 49u8;
21540    const ENCODED_LEN: usize = 43usize;
21541    fn deser(
21542        _version: MavlinkVersion,
21543        __input: &[u8],
21544    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21545        let avail_len = __input.len();
21546        let mut payload_buf = [0; Self::ENCODED_LEN];
21547        let mut buf = if avail_len < Self::ENCODED_LEN {
21548            payload_buf[0..avail_len].copy_from_slice(__input);
21549            Bytes::new(&payload_buf)
21550        } else {
21551            Bytes::new(__input)
21552        };
21553        let mut __struct = Self::default();
21554        __struct.target_system = buf.get_u8();
21555        __struct.target_component = buf.get_u8();
21556        for v in &mut __struct.id_or_mac {
21557            let val = buf.get_u8();
21558            *v = val;
21559        }
21560        let tmp = buf.get_u8();
21561        __struct.operator_id_type =
21562            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21563                enum_type: "MavOdidOperatorIdType",
21564                value: tmp as u32,
21565            })?;
21566        for v in &mut __struct.operator_id {
21567            let val = buf.get_u8();
21568            *v = val;
21569        }
21570        Ok(__struct)
21571    }
21572    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21573        let mut __tmp = BytesMut::new(bytes);
21574        #[allow(clippy::absurd_extreme_comparisons)]
21575        #[allow(unused_comparisons)]
21576        if __tmp.remaining() < Self::ENCODED_LEN {
21577            panic!(
21578                "buffer is too small (need {} bytes, but got {})",
21579                Self::ENCODED_LEN,
21580                __tmp.remaining(),
21581            )
21582        }
21583        __tmp.put_u8(self.target_system);
21584        __tmp.put_u8(self.target_component);
21585        for val in &self.id_or_mac {
21586            __tmp.put_u8(*val);
21587        }
21588        __tmp.put_u8(self.operator_id_type as u8);
21589        for val in &self.operator_id {
21590            __tmp.put_u8(*val);
21591        }
21592        if matches!(version, MavlinkVersion::V2) {
21593            let len = __tmp.len();
21594            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21595        } else {
21596            __tmp.len()
21597        }
21598    }
21599}
21600#[doc = "id: 12903"]
21601#[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
21602#[derive(Debug, Clone, PartialEq)]
21603#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21604#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21605pub struct OPEN_DRONE_ID_SELF_ID_DATA {
21606    #[doc = "System ID (0 for broadcast)."]
21607    pub target_system: u8,
21608    #[doc = "Component ID (0 for broadcast)."]
21609    pub target_component: u8,
21610    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21611    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21612    pub id_or_mac: [u8; 20],
21613    #[doc = "Indicates the type of the description field."]
21614    pub description_type: MavOdidDescType,
21615    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
21616    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21617    pub description: [u8; 23],
21618}
21619impl OPEN_DRONE_ID_SELF_ID_DATA {
21620    pub const ENCODED_LEN: usize = 46usize;
21621    pub const DEFAULT: Self = Self {
21622        target_system: 0_u8,
21623        target_component: 0_u8,
21624        id_or_mac: [0_u8; 20usize],
21625        description_type: MavOdidDescType::DEFAULT,
21626        description: [0_u8; 23usize],
21627    };
21628    #[cfg(feature = "arbitrary")]
21629    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21630        use arbitrary::{Arbitrary, Unstructured};
21631        let mut buf = [0u8; 1024];
21632        rng.fill_bytes(&mut buf);
21633        let mut unstructured = Unstructured::new(&buf);
21634        Self::arbitrary(&mut unstructured).unwrap_or_default()
21635    }
21636}
21637impl Default for OPEN_DRONE_ID_SELF_ID_DATA {
21638    fn default() -> Self {
21639        Self::DEFAULT.clone()
21640    }
21641}
21642impl MessageData for OPEN_DRONE_ID_SELF_ID_DATA {
21643    type Message = MavMessage;
21644    const ID: u32 = 12903u32;
21645    const NAME: &'static str = "OPEN_DRONE_ID_SELF_ID";
21646    const EXTRA_CRC: u8 = 249u8;
21647    const ENCODED_LEN: usize = 46usize;
21648    fn deser(
21649        _version: MavlinkVersion,
21650        __input: &[u8],
21651    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21652        let avail_len = __input.len();
21653        let mut payload_buf = [0; Self::ENCODED_LEN];
21654        let mut buf = if avail_len < Self::ENCODED_LEN {
21655            payload_buf[0..avail_len].copy_from_slice(__input);
21656            Bytes::new(&payload_buf)
21657        } else {
21658            Bytes::new(__input)
21659        };
21660        let mut __struct = Self::default();
21661        __struct.target_system = buf.get_u8();
21662        __struct.target_component = buf.get_u8();
21663        for v in &mut __struct.id_or_mac {
21664            let val = buf.get_u8();
21665            *v = val;
21666        }
21667        let tmp = buf.get_u8();
21668        __struct.description_type =
21669            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21670                enum_type: "MavOdidDescType",
21671                value: tmp as u32,
21672            })?;
21673        for v in &mut __struct.description {
21674            let val = buf.get_u8();
21675            *v = val;
21676        }
21677        Ok(__struct)
21678    }
21679    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21680        let mut __tmp = BytesMut::new(bytes);
21681        #[allow(clippy::absurd_extreme_comparisons)]
21682        #[allow(unused_comparisons)]
21683        if __tmp.remaining() < Self::ENCODED_LEN {
21684            panic!(
21685                "buffer is too small (need {} bytes, but got {})",
21686                Self::ENCODED_LEN,
21687                __tmp.remaining(),
21688            )
21689        }
21690        __tmp.put_u8(self.target_system);
21691        __tmp.put_u8(self.target_component);
21692        for val in &self.id_or_mac {
21693            __tmp.put_u8(*val);
21694        }
21695        __tmp.put_u8(self.description_type as u8);
21696        for val in &self.description {
21697            __tmp.put_u8(*val);
21698        }
21699        if matches!(version, MavlinkVersion::V2) {
21700            let len = __tmp.len();
21701            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21702        } else {
21703            __tmp.len()
21704        }
21705    }
21706}
21707#[doc = "id: 12904"]
21708#[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
21709#[derive(Debug, Clone, PartialEq)]
21710#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21711#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21712pub struct OPEN_DRONE_ID_SYSTEM_DATA {
21713    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
21714    pub operator_latitude: i32,
21715    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
21716    pub operator_longitude: i32,
21717    #[doc = "Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
21718    pub area_ceiling: f32,
21719    #[doc = "Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
21720    pub area_floor: f32,
21721    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
21722    pub operator_altitude_geo: f32,
21723    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
21724    pub timestamp: u32,
21725    #[doc = "Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA."]
21726    pub area_count: u16,
21727    #[doc = "Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA."]
21728    pub area_radius: u16,
21729    #[doc = "System ID (0 for broadcast)."]
21730    pub target_system: u8,
21731    #[doc = "Component ID (0 for broadcast)."]
21732    pub target_component: u8,
21733    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21734    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21735    pub id_or_mac: [u8; 20],
21736    #[doc = "Specifies the operator location type."]
21737    pub operator_location_type: MavOdidOperatorLocationType,
21738    #[doc = "Specifies the classification type of the UA."]
21739    pub classification_type: MavOdidClassificationType,
21740    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA."]
21741    pub category_eu: MavOdidCategoryEu,
21742    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA."]
21743    pub class_eu: MavOdidClassEu,
21744}
21745impl OPEN_DRONE_ID_SYSTEM_DATA {
21746    pub const ENCODED_LEN: usize = 54usize;
21747    pub const DEFAULT: Self = Self {
21748        operator_latitude: 0_i32,
21749        operator_longitude: 0_i32,
21750        area_ceiling: 0.0_f32,
21751        area_floor: 0.0_f32,
21752        operator_altitude_geo: 0.0_f32,
21753        timestamp: 0_u32,
21754        area_count: 0_u16,
21755        area_radius: 0_u16,
21756        target_system: 0_u8,
21757        target_component: 0_u8,
21758        id_or_mac: [0_u8; 20usize],
21759        operator_location_type: MavOdidOperatorLocationType::DEFAULT,
21760        classification_type: MavOdidClassificationType::DEFAULT,
21761        category_eu: MavOdidCategoryEu::DEFAULT,
21762        class_eu: MavOdidClassEu::DEFAULT,
21763    };
21764    #[cfg(feature = "arbitrary")]
21765    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21766        use arbitrary::{Arbitrary, Unstructured};
21767        let mut buf = [0u8; 1024];
21768        rng.fill_bytes(&mut buf);
21769        let mut unstructured = Unstructured::new(&buf);
21770        Self::arbitrary(&mut unstructured).unwrap_or_default()
21771    }
21772}
21773impl Default for OPEN_DRONE_ID_SYSTEM_DATA {
21774    fn default() -> Self {
21775        Self::DEFAULT.clone()
21776    }
21777}
21778impl MessageData for OPEN_DRONE_ID_SYSTEM_DATA {
21779    type Message = MavMessage;
21780    const ID: u32 = 12904u32;
21781    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM";
21782    const EXTRA_CRC: u8 = 77u8;
21783    const ENCODED_LEN: usize = 54usize;
21784    fn deser(
21785        _version: MavlinkVersion,
21786        __input: &[u8],
21787    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21788        let avail_len = __input.len();
21789        let mut payload_buf = [0; Self::ENCODED_LEN];
21790        let mut buf = if avail_len < Self::ENCODED_LEN {
21791            payload_buf[0..avail_len].copy_from_slice(__input);
21792            Bytes::new(&payload_buf)
21793        } else {
21794            Bytes::new(__input)
21795        };
21796        let mut __struct = Self::default();
21797        __struct.operator_latitude = buf.get_i32_le();
21798        __struct.operator_longitude = buf.get_i32_le();
21799        __struct.area_ceiling = buf.get_f32_le();
21800        __struct.area_floor = buf.get_f32_le();
21801        __struct.operator_altitude_geo = buf.get_f32_le();
21802        __struct.timestamp = buf.get_u32_le();
21803        __struct.area_count = buf.get_u16_le();
21804        __struct.area_radius = buf.get_u16_le();
21805        __struct.target_system = buf.get_u8();
21806        __struct.target_component = buf.get_u8();
21807        for v in &mut __struct.id_or_mac {
21808            let val = buf.get_u8();
21809            *v = val;
21810        }
21811        let tmp = buf.get_u8();
21812        __struct.operator_location_type =
21813            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21814                enum_type: "MavOdidOperatorLocationType",
21815                value: tmp as u32,
21816            })?;
21817        let tmp = buf.get_u8();
21818        __struct.classification_type =
21819            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21820                enum_type: "MavOdidClassificationType",
21821                value: tmp as u32,
21822            })?;
21823        let tmp = buf.get_u8();
21824        __struct.category_eu =
21825            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21826                enum_type: "MavOdidCategoryEu",
21827                value: tmp as u32,
21828            })?;
21829        let tmp = buf.get_u8();
21830        __struct.class_eu =
21831            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21832                enum_type: "MavOdidClassEu",
21833                value: tmp as u32,
21834            })?;
21835        Ok(__struct)
21836    }
21837    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21838        let mut __tmp = BytesMut::new(bytes);
21839        #[allow(clippy::absurd_extreme_comparisons)]
21840        #[allow(unused_comparisons)]
21841        if __tmp.remaining() < Self::ENCODED_LEN {
21842            panic!(
21843                "buffer is too small (need {} bytes, but got {})",
21844                Self::ENCODED_LEN,
21845                __tmp.remaining(),
21846            )
21847        }
21848        __tmp.put_i32_le(self.operator_latitude);
21849        __tmp.put_i32_le(self.operator_longitude);
21850        __tmp.put_f32_le(self.area_ceiling);
21851        __tmp.put_f32_le(self.area_floor);
21852        __tmp.put_f32_le(self.operator_altitude_geo);
21853        __tmp.put_u32_le(self.timestamp);
21854        __tmp.put_u16_le(self.area_count);
21855        __tmp.put_u16_le(self.area_radius);
21856        __tmp.put_u8(self.target_system);
21857        __tmp.put_u8(self.target_component);
21858        for val in &self.id_or_mac {
21859            __tmp.put_u8(*val);
21860        }
21861        __tmp.put_u8(self.operator_location_type as u8);
21862        __tmp.put_u8(self.classification_type as u8);
21863        __tmp.put_u8(self.category_eu as u8);
21864        __tmp.put_u8(self.class_eu as u8);
21865        if matches!(version, MavlinkVersion::V2) {
21866            let len = __tmp.len();
21867            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21868        } else {
21869            __tmp.len()
21870        }
21871    }
21872}
21873#[doc = "id: 12919"]
21874#[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
21875#[derive(Debug, Clone, PartialEq)]
21876#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21877#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21878pub struct OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
21879    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
21880    pub operator_latitude: i32,
21881    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
21882    pub operator_longitude: i32,
21883    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
21884    pub operator_altitude_geo: f32,
21885    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
21886    pub timestamp: u32,
21887    #[doc = "System ID (0 for broadcast)."]
21888    pub target_system: u8,
21889    #[doc = "Component ID (0 for broadcast)."]
21890    pub target_component: u8,
21891}
21892impl OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
21893    pub const ENCODED_LEN: usize = 18usize;
21894    pub const DEFAULT: Self = Self {
21895        operator_latitude: 0_i32,
21896        operator_longitude: 0_i32,
21897        operator_altitude_geo: 0.0_f32,
21898        timestamp: 0_u32,
21899        target_system: 0_u8,
21900        target_component: 0_u8,
21901    };
21902    #[cfg(feature = "arbitrary")]
21903    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21904        use arbitrary::{Arbitrary, Unstructured};
21905        let mut buf = [0u8; 1024];
21906        rng.fill_bytes(&mut buf);
21907        let mut unstructured = Unstructured::new(&buf);
21908        Self::arbitrary(&mut unstructured).unwrap_or_default()
21909    }
21910}
21911impl Default for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
21912    fn default() -> Self {
21913        Self::DEFAULT.clone()
21914    }
21915}
21916impl MessageData for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
21917    type Message = MavMessage;
21918    const ID: u32 = 12919u32;
21919    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM_UPDATE";
21920    const EXTRA_CRC: u8 = 7u8;
21921    const ENCODED_LEN: usize = 18usize;
21922    fn deser(
21923        _version: MavlinkVersion,
21924        __input: &[u8],
21925    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21926        let avail_len = __input.len();
21927        let mut payload_buf = [0; Self::ENCODED_LEN];
21928        let mut buf = if avail_len < Self::ENCODED_LEN {
21929            payload_buf[0..avail_len].copy_from_slice(__input);
21930            Bytes::new(&payload_buf)
21931        } else {
21932            Bytes::new(__input)
21933        };
21934        let mut __struct = Self::default();
21935        __struct.operator_latitude = buf.get_i32_le();
21936        __struct.operator_longitude = buf.get_i32_le();
21937        __struct.operator_altitude_geo = buf.get_f32_le();
21938        __struct.timestamp = buf.get_u32_le();
21939        __struct.target_system = buf.get_u8();
21940        __struct.target_component = buf.get_u8();
21941        Ok(__struct)
21942    }
21943    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21944        let mut __tmp = BytesMut::new(bytes);
21945        #[allow(clippy::absurd_extreme_comparisons)]
21946        #[allow(unused_comparisons)]
21947        if __tmp.remaining() < Self::ENCODED_LEN {
21948            panic!(
21949                "buffer is too small (need {} bytes, but got {})",
21950                Self::ENCODED_LEN,
21951                __tmp.remaining(),
21952            )
21953        }
21954        __tmp.put_i32_le(self.operator_latitude);
21955        __tmp.put_i32_le(self.operator_longitude);
21956        __tmp.put_f32_le(self.operator_altitude_geo);
21957        __tmp.put_u32_le(self.timestamp);
21958        __tmp.put_u8(self.target_system);
21959        __tmp.put_u8(self.target_component);
21960        if matches!(version, MavlinkVersion::V2) {
21961            let len = __tmp.len();
21962            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21963        } else {
21964            __tmp.len()
21965        }
21966    }
21967}
21968#[doc = "id: 100"]
21969#[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
21970#[derive(Debug, Clone, PartialEq)]
21971#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21972#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21973pub struct OPTICAL_FLOW_DATA {
21974    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21975    pub time_usec: u64,
21976    #[doc = "Flow in x-sensor direction, angular-speed compensated"]
21977    pub flow_comp_m_x: f32,
21978    #[doc = "Flow in y-sensor direction, angular-speed compensated"]
21979    pub flow_comp_m_y: f32,
21980    #[doc = "Ground distance. Positive value: distance known. Negative value: Unknown distance"]
21981    pub ground_distance: f32,
21982    #[doc = "Flow in x-sensor direction"]
21983    pub flow_x: i16,
21984    #[doc = "Flow in y-sensor direction"]
21985    pub flow_y: i16,
21986    #[doc = "Sensor ID"]
21987    pub sensor_id: u8,
21988    #[doc = "Optical flow quality / confidence. 0: bad, 255: maximum quality"]
21989    pub quality: u8,
21990    #[doc = "Flow rate about X axis"]
21991    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21992    pub flow_rate_x: f32,
21993    #[doc = "Flow rate about Y axis"]
21994    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21995    pub flow_rate_y: f32,
21996}
21997impl OPTICAL_FLOW_DATA {
21998    pub const ENCODED_LEN: usize = 34usize;
21999    pub const DEFAULT: Self = Self {
22000        time_usec: 0_u64,
22001        flow_comp_m_x: 0.0_f32,
22002        flow_comp_m_y: 0.0_f32,
22003        ground_distance: 0.0_f32,
22004        flow_x: 0_i16,
22005        flow_y: 0_i16,
22006        sensor_id: 0_u8,
22007        quality: 0_u8,
22008        flow_rate_x: 0.0_f32,
22009        flow_rate_y: 0.0_f32,
22010    };
22011    #[cfg(feature = "arbitrary")]
22012    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22013        use arbitrary::{Arbitrary, Unstructured};
22014        let mut buf = [0u8; 1024];
22015        rng.fill_bytes(&mut buf);
22016        let mut unstructured = Unstructured::new(&buf);
22017        Self::arbitrary(&mut unstructured).unwrap_or_default()
22018    }
22019}
22020impl Default for OPTICAL_FLOW_DATA {
22021    fn default() -> Self {
22022        Self::DEFAULT.clone()
22023    }
22024}
22025impl MessageData for OPTICAL_FLOW_DATA {
22026    type Message = MavMessage;
22027    const ID: u32 = 100u32;
22028    const NAME: &'static str = "OPTICAL_FLOW";
22029    const EXTRA_CRC: u8 = 175u8;
22030    const ENCODED_LEN: usize = 34usize;
22031    fn deser(
22032        _version: MavlinkVersion,
22033        __input: &[u8],
22034    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22035        let avail_len = __input.len();
22036        let mut payload_buf = [0; Self::ENCODED_LEN];
22037        let mut buf = if avail_len < Self::ENCODED_LEN {
22038            payload_buf[0..avail_len].copy_from_slice(__input);
22039            Bytes::new(&payload_buf)
22040        } else {
22041            Bytes::new(__input)
22042        };
22043        let mut __struct = Self::default();
22044        __struct.time_usec = buf.get_u64_le();
22045        __struct.flow_comp_m_x = buf.get_f32_le();
22046        __struct.flow_comp_m_y = buf.get_f32_le();
22047        __struct.ground_distance = buf.get_f32_le();
22048        __struct.flow_x = buf.get_i16_le();
22049        __struct.flow_y = buf.get_i16_le();
22050        __struct.sensor_id = buf.get_u8();
22051        __struct.quality = buf.get_u8();
22052        __struct.flow_rate_x = buf.get_f32_le();
22053        __struct.flow_rate_y = buf.get_f32_le();
22054        Ok(__struct)
22055    }
22056    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22057        let mut __tmp = BytesMut::new(bytes);
22058        #[allow(clippy::absurd_extreme_comparisons)]
22059        #[allow(unused_comparisons)]
22060        if __tmp.remaining() < Self::ENCODED_LEN {
22061            panic!(
22062                "buffer is too small (need {} bytes, but got {})",
22063                Self::ENCODED_LEN,
22064                __tmp.remaining(),
22065            )
22066        }
22067        __tmp.put_u64_le(self.time_usec);
22068        __tmp.put_f32_le(self.flow_comp_m_x);
22069        __tmp.put_f32_le(self.flow_comp_m_y);
22070        __tmp.put_f32_le(self.ground_distance);
22071        __tmp.put_i16_le(self.flow_x);
22072        __tmp.put_i16_le(self.flow_y);
22073        __tmp.put_u8(self.sensor_id);
22074        __tmp.put_u8(self.quality);
22075        __tmp.put_f32_le(self.flow_rate_x);
22076        __tmp.put_f32_le(self.flow_rate_y);
22077        if matches!(version, MavlinkVersion::V2) {
22078            let len = __tmp.len();
22079            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22080        } else {
22081            __tmp.len()
22082        }
22083    }
22084}
22085#[doc = "id: 106"]
22086#[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
22087#[derive(Debug, Clone, PartialEq)]
22088#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22089#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22090pub struct OPTICAL_FLOW_RAD_DATA {
22091    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22092    pub time_usec: u64,
22093    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
22094    pub integration_time_us: u32,
22095    #[doc = "Flow around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
22096    pub integrated_x: f32,
22097    #[doc = "Flow around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
22098    pub integrated_y: f32,
22099    #[doc = "RH rotation around X axis"]
22100    pub integrated_xgyro: f32,
22101    #[doc = "RH rotation around Y axis"]
22102    pub integrated_ygyro: f32,
22103    #[doc = "RH rotation around Z axis"]
22104    pub integrated_zgyro: f32,
22105    #[doc = "Time since the distance was sampled."]
22106    pub time_delta_distance_us: u32,
22107    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
22108    pub distance: f32,
22109    #[doc = "Temperature"]
22110    pub temperature: i16,
22111    #[doc = "Sensor ID"]
22112    pub sensor_id: u8,
22113    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
22114    pub quality: u8,
22115}
22116impl OPTICAL_FLOW_RAD_DATA {
22117    pub const ENCODED_LEN: usize = 44usize;
22118    pub const DEFAULT: Self = Self {
22119        time_usec: 0_u64,
22120        integration_time_us: 0_u32,
22121        integrated_x: 0.0_f32,
22122        integrated_y: 0.0_f32,
22123        integrated_xgyro: 0.0_f32,
22124        integrated_ygyro: 0.0_f32,
22125        integrated_zgyro: 0.0_f32,
22126        time_delta_distance_us: 0_u32,
22127        distance: 0.0_f32,
22128        temperature: 0_i16,
22129        sensor_id: 0_u8,
22130        quality: 0_u8,
22131    };
22132    #[cfg(feature = "arbitrary")]
22133    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22134        use arbitrary::{Arbitrary, Unstructured};
22135        let mut buf = [0u8; 1024];
22136        rng.fill_bytes(&mut buf);
22137        let mut unstructured = Unstructured::new(&buf);
22138        Self::arbitrary(&mut unstructured).unwrap_or_default()
22139    }
22140}
22141impl Default for OPTICAL_FLOW_RAD_DATA {
22142    fn default() -> Self {
22143        Self::DEFAULT.clone()
22144    }
22145}
22146impl MessageData for OPTICAL_FLOW_RAD_DATA {
22147    type Message = MavMessage;
22148    const ID: u32 = 106u32;
22149    const NAME: &'static str = "OPTICAL_FLOW_RAD";
22150    const EXTRA_CRC: u8 = 138u8;
22151    const ENCODED_LEN: usize = 44usize;
22152    fn deser(
22153        _version: MavlinkVersion,
22154        __input: &[u8],
22155    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22156        let avail_len = __input.len();
22157        let mut payload_buf = [0; Self::ENCODED_LEN];
22158        let mut buf = if avail_len < Self::ENCODED_LEN {
22159            payload_buf[0..avail_len].copy_from_slice(__input);
22160            Bytes::new(&payload_buf)
22161        } else {
22162            Bytes::new(__input)
22163        };
22164        let mut __struct = Self::default();
22165        __struct.time_usec = buf.get_u64_le();
22166        __struct.integration_time_us = buf.get_u32_le();
22167        __struct.integrated_x = buf.get_f32_le();
22168        __struct.integrated_y = buf.get_f32_le();
22169        __struct.integrated_xgyro = buf.get_f32_le();
22170        __struct.integrated_ygyro = buf.get_f32_le();
22171        __struct.integrated_zgyro = buf.get_f32_le();
22172        __struct.time_delta_distance_us = buf.get_u32_le();
22173        __struct.distance = buf.get_f32_le();
22174        __struct.temperature = buf.get_i16_le();
22175        __struct.sensor_id = buf.get_u8();
22176        __struct.quality = buf.get_u8();
22177        Ok(__struct)
22178    }
22179    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22180        let mut __tmp = BytesMut::new(bytes);
22181        #[allow(clippy::absurd_extreme_comparisons)]
22182        #[allow(unused_comparisons)]
22183        if __tmp.remaining() < Self::ENCODED_LEN {
22184            panic!(
22185                "buffer is too small (need {} bytes, but got {})",
22186                Self::ENCODED_LEN,
22187                __tmp.remaining(),
22188            )
22189        }
22190        __tmp.put_u64_le(self.time_usec);
22191        __tmp.put_u32_le(self.integration_time_us);
22192        __tmp.put_f32_le(self.integrated_x);
22193        __tmp.put_f32_le(self.integrated_y);
22194        __tmp.put_f32_le(self.integrated_xgyro);
22195        __tmp.put_f32_le(self.integrated_ygyro);
22196        __tmp.put_f32_le(self.integrated_zgyro);
22197        __tmp.put_u32_le(self.time_delta_distance_us);
22198        __tmp.put_f32_le(self.distance);
22199        __tmp.put_i16_le(self.temperature);
22200        __tmp.put_u8(self.sensor_id);
22201        __tmp.put_u8(self.quality);
22202        if matches!(version, MavlinkVersion::V2) {
22203            let len = __tmp.len();
22204            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22205        } else {
22206            __tmp.len()
22207        }
22208    }
22209}
22210#[doc = "id: 360"]
22211#[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
22212#[derive(Debug, Clone, PartialEq)]
22213#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22214#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22215pub struct ORBIT_EXECUTION_STATUS_DATA {
22216    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22217    pub time_usec: u64,
22218    #[doc = "Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise."]
22219    pub radius: f32,
22220    #[doc = "X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
22221    pub x: i32,
22222    #[doc = "Y coordinate of center point.  Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
22223    pub y: i32,
22224    #[doc = "Altitude of center point. Coordinate system depends on frame field."]
22225    pub z: f32,
22226    #[doc = "The coordinate system of the fields: x, y, z."]
22227    pub frame: MavFrame,
22228}
22229impl ORBIT_EXECUTION_STATUS_DATA {
22230    pub const ENCODED_LEN: usize = 25usize;
22231    pub const DEFAULT: Self = Self {
22232        time_usec: 0_u64,
22233        radius: 0.0_f32,
22234        x: 0_i32,
22235        y: 0_i32,
22236        z: 0.0_f32,
22237        frame: MavFrame::DEFAULT,
22238    };
22239    #[cfg(feature = "arbitrary")]
22240    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22241        use arbitrary::{Arbitrary, Unstructured};
22242        let mut buf = [0u8; 1024];
22243        rng.fill_bytes(&mut buf);
22244        let mut unstructured = Unstructured::new(&buf);
22245        Self::arbitrary(&mut unstructured).unwrap_or_default()
22246    }
22247}
22248impl Default for ORBIT_EXECUTION_STATUS_DATA {
22249    fn default() -> Self {
22250        Self::DEFAULT.clone()
22251    }
22252}
22253impl MessageData for ORBIT_EXECUTION_STATUS_DATA {
22254    type Message = MavMessage;
22255    const ID: u32 = 360u32;
22256    const NAME: &'static str = "ORBIT_EXECUTION_STATUS";
22257    const EXTRA_CRC: u8 = 11u8;
22258    const ENCODED_LEN: usize = 25usize;
22259    fn deser(
22260        _version: MavlinkVersion,
22261        __input: &[u8],
22262    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22263        let avail_len = __input.len();
22264        let mut payload_buf = [0; Self::ENCODED_LEN];
22265        let mut buf = if avail_len < Self::ENCODED_LEN {
22266            payload_buf[0..avail_len].copy_from_slice(__input);
22267            Bytes::new(&payload_buf)
22268        } else {
22269            Bytes::new(__input)
22270        };
22271        let mut __struct = Self::default();
22272        __struct.time_usec = buf.get_u64_le();
22273        __struct.radius = buf.get_f32_le();
22274        __struct.x = buf.get_i32_le();
22275        __struct.y = buf.get_i32_le();
22276        __struct.z = buf.get_f32_le();
22277        let tmp = buf.get_u8();
22278        __struct.frame =
22279            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22280                enum_type: "MavFrame",
22281                value: tmp as u32,
22282            })?;
22283        Ok(__struct)
22284    }
22285    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22286        let mut __tmp = BytesMut::new(bytes);
22287        #[allow(clippy::absurd_extreme_comparisons)]
22288        #[allow(unused_comparisons)]
22289        if __tmp.remaining() < Self::ENCODED_LEN {
22290            panic!(
22291                "buffer is too small (need {} bytes, but got {})",
22292                Self::ENCODED_LEN,
22293                __tmp.remaining(),
22294            )
22295        }
22296        __tmp.put_u64_le(self.time_usec);
22297        __tmp.put_f32_le(self.radius);
22298        __tmp.put_i32_le(self.x);
22299        __tmp.put_i32_le(self.y);
22300        __tmp.put_f32_le(self.z);
22301        __tmp.put_u8(self.frame as u8);
22302        if matches!(version, MavlinkVersion::V2) {
22303            let len = __tmp.len();
22304            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22305        } else {
22306            __tmp.len()
22307        }
22308    }
22309}
22310#[doc = "id: 324"]
22311#[doc = "Response from a PARAM_EXT_SET message."]
22312#[derive(Debug, Clone, PartialEq)]
22313#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22314#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22315pub struct PARAM_EXT_ACK_DATA {
22316    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
22317    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22318    pub param_id: [u8; 16],
22319    #[doc = "Parameter value (new value if PARAM_ACK_ACCEPTED, current value otherwise)"]
22320    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22321    pub param_value: [u8; 128],
22322    #[doc = "Parameter type."]
22323    pub param_type: MavParamExtType,
22324    #[doc = "Result code."]
22325    pub param_result: ParamAck,
22326}
22327impl PARAM_EXT_ACK_DATA {
22328    pub const ENCODED_LEN: usize = 146usize;
22329    pub const DEFAULT: Self = Self {
22330        param_id: [0_u8; 16usize],
22331        param_value: [0_u8; 128usize],
22332        param_type: MavParamExtType::DEFAULT,
22333        param_result: ParamAck::DEFAULT,
22334    };
22335    #[cfg(feature = "arbitrary")]
22336    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22337        use arbitrary::{Arbitrary, Unstructured};
22338        let mut buf = [0u8; 1024];
22339        rng.fill_bytes(&mut buf);
22340        let mut unstructured = Unstructured::new(&buf);
22341        Self::arbitrary(&mut unstructured).unwrap_or_default()
22342    }
22343}
22344impl Default for PARAM_EXT_ACK_DATA {
22345    fn default() -> Self {
22346        Self::DEFAULT.clone()
22347    }
22348}
22349impl MessageData for PARAM_EXT_ACK_DATA {
22350    type Message = MavMessage;
22351    const ID: u32 = 324u32;
22352    const NAME: &'static str = "PARAM_EXT_ACK";
22353    const EXTRA_CRC: u8 = 132u8;
22354    const ENCODED_LEN: usize = 146usize;
22355    fn deser(
22356        _version: MavlinkVersion,
22357        __input: &[u8],
22358    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22359        let avail_len = __input.len();
22360        let mut payload_buf = [0; Self::ENCODED_LEN];
22361        let mut buf = if avail_len < Self::ENCODED_LEN {
22362            payload_buf[0..avail_len].copy_from_slice(__input);
22363            Bytes::new(&payload_buf)
22364        } else {
22365            Bytes::new(__input)
22366        };
22367        let mut __struct = Self::default();
22368        for v in &mut __struct.param_id {
22369            let val = buf.get_u8();
22370            *v = val;
22371        }
22372        for v in &mut __struct.param_value {
22373            let val = buf.get_u8();
22374            *v = val;
22375        }
22376        let tmp = buf.get_u8();
22377        __struct.param_type =
22378            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22379                enum_type: "MavParamExtType",
22380                value: tmp as u32,
22381            })?;
22382        let tmp = buf.get_u8();
22383        __struct.param_result =
22384            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22385                enum_type: "ParamAck",
22386                value: tmp as u32,
22387            })?;
22388        Ok(__struct)
22389    }
22390    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22391        let mut __tmp = BytesMut::new(bytes);
22392        #[allow(clippy::absurd_extreme_comparisons)]
22393        #[allow(unused_comparisons)]
22394        if __tmp.remaining() < Self::ENCODED_LEN {
22395            panic!(
22396                "buffer is too small (need {} bytes, but got {})",
22397                Self::ENCODED_LEN,
22398                __tmp.remaining(),
22399            )
22400        }
22401        for val in &self.param_id {
22402            __tmp.put_u8(*val);
22403        }
22404        for val in &self.param_value {
22405            __tmp.put_u8(*val);
22406        }
22407        __tmp.put_u8(self.param_type as u8);
22408        __tmp.put_u8(self.param_result as u8);
22409        if matches!(version, MavlinkVersion::V2) {
22410            let len = __tmp.len();
22411            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22412        } else {
22413            __tmp.len()
22414        }
22415    }
22416}
22417#[doc = "id: 321"]
22418#[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
22419#[derive(Debug, Clone, PartialEq)]
22420#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22421#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22422pub struct PARAM_EXT_REQUEST_LIST_DATA {
22423    #[doc = "System ID"]
22424    pub target_system: u8,
22425    #[doc = "Component ID"]
22426    pub target_component: u8,
22427}
22428impl PARAM_EXT_REQUEST_LIST_DATA {
22429    pub const ENCODED_LEN: usize = 2usize;
22430    pub const DEFAULT: Self = Self {
22431        target_system: 0_u8,
22432        target_component: 0_u8,
22433    };
22434    #[cfg(feature = "arbitrary")]
22435    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22436        use arbitrary::{Arbitrary, Unstructured};
22437        let mut buf = [0u8; 1024];
22438        rng.fill_bytes(&mut buf);
22439        let mut unstructured = Unstructured::new(&buf);
22440        Self::arbitrary(&mut unstructured).unwrap_or_default()
22441    }
22442}
22443impl Default for PARAM_EXT_REQUEST_LIST_DATA {
22444    fn default() -> Self {
22445        Self::DEFAULT.clone()
22446    }
22447}
22448impl MessageData for PARAM_EXT_REQUEST_LIST_DATA {
22449    type Message = MavMessage;
22450    const ID: u32 = 321u32;
22451    const NAME: &'static str = "PARAM_EXT_REQUEST_LIST";
22452    const EXTRA_CRC: u8 = 88u8;
22453    const ENCODED_LEN: usize = 2usize;
22454    fn deser(
22455        _version: MavlinkVersion,
22456        __input: &[u8],
22457    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22458        let avail_len = __input.len();
22459        let mut payload_buf = [0; Self::ENCODED_LEN];
22460        let mut buf = if avail_len < Self::ENCODED_LEN {
22461            payload_buf[0..avail_len].copy_from_slice(__input);
22462            Bytes::new(&payload_buf)
22463        } else {
22464            Bytes::new(__input)
22465        };
22466        let mut __struct = Self::default();
22467        __struct.target_system = buf.get_u8();
22468        __struct.target_component = buf.get_u8();
22469        Ok(__struct)
22470    }
22471    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22472        let mut __tmp = BytesMut::new(bytes);
22473        #[allow(clippy::absurd_extreme_comparisons)]
22474        #[allow(unused_comparisons)]
22475        if __tmp.remaining() < Self::ENCODED_LEN {
22476            panic!(
22477                "buffer is too small (need {} bytes, but got {})",
22478                Self::ENCODED_LEN,
22479                __tmp.remaining(),
22480            )
22481        }
22482        __tmp.put_u8(self.target_system);
22483        __tmp.put_u8(self.target_component);
22484        if matches!(version, MavlinkVersion::V2) {
22485            let len = __tmp.len();
22486            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22487        } else {
22488            __tmp.len()
22489        }
22490    }
22491}
22492#[doc = "id: 320"]
22493#[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
22494#[derive(Debug, Clone, PartialEq)]
22495#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22496#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22497pub struct PARAM_EXT_REQUEST_READ_DATA {
22498    #[doc = "Parameter index. Set to -1 to use the Parameter ID field as identifier (else param_id will be ignored)"]
22499    pub param_index: i16,
22500    #[doc = "System ID"]
22501    pub target_system: u8,
22502    #[doc = "Component ID"]
22503    pub target_component: u8,
22504    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
22505    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22506    pub param_id: [u8; 16],
22507}
22508impl PARAM_EXT_REQUEST_READ_DATA {
22509    pub const ENCODED_LEN: usize = 20usize;
22510    pub const DEFAULT: Self = Self {
22511        param_index: 0_i16,
22512        target_system: 0_u8,
22513        target_component: 0_u8,
22514        param_id: [0_u8; 16usize],
22515    };
22516    #[cfg(feature = "arbitrary")]
22517    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22518        use arbitrary::{Arbitrary, Unstructured};
22519        let mut buf = [0u8; 1024];
22520        rng.fill_bytes(&mut buf);
22521        let mut unstructured = Unstructured::new(&buf);
22522        Self::arbitrary(&mut unstructured).unwrap_or_default()
22523    }
22524}
22525impl Default for PARAM_EXT_REQUEST_READ_DATA {
22526    fn default() -> Self {
22527        Self::DEFAULT.clone()
22528    }
22529}
22530impl MessageData for PARAM_EXT_REQUEST_READ_DATA {
22531    type Message = MavMessage;
22532    const ID: u32 = 320u32;
22533    const NAME: &'static str = "PARAM_EXT_REQUEST_READ";
22534    const EXTRA_CRC: u8 = 243u8;
22535    const ENCODED_LEN: usize = 20usize;
22536    fn deser(
22537        _version: MavlinkVersion,
22538        __input: &[u8],
22539    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22540        let avail_len = __input.len();
22541        let mut payload_buf = [0; Self::ENCODED_LEN];
22542        let mut buf = if avail_len < Self::ENCODED_LEN {
22543            payload_buf[0..avail_len].copy_from_slice(__input);
22544            Bytes::new(&payload_buf)
22545        } else {
22546            Bytes::new(__input)
22547        };
22548        let mut __struct = Self::default();
22549        __struct.param_index = buf.get_i16_le();
22550        __struct.target_system = buf.get_u8();
22551        __struct.target_component = buf.get_u8();
22552        for v in &mut __struct.param_id {
22553            let val = buf.get_u8();
22554            *v = val;
22555        }
22556        Ok(__struct)
22557    }
22558    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22559        let mut __tmp = BytesMut::new(bytes);
22560        #[allow(clippy::absurd_extreme_comparisons)]
22561        #[allow(unused_comparisons)]
22562        if __tmp.remaining() < Self::ENCODED_LEN {
22563            panic!(
22564                "buffer is too small (need {} bytes, but got {})",
22565                Self::ENCODED_LEN,
22566                __tmp.remaining(),
22567            )
22568        }
22569        __tmp.put_i16_le(self.param_index);
22570        __tmp.put_u8(self.target_system);
22571        __tmp.put_u8(self.target_component);
22572        for val in &self.param_id {
22573            __tmp.put_u8(*val);
22574        }
22575        if matches!(version, MavlinkVersion::V2) {
22576            let len = __tmp.len();
22577            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22578        } else {
22579            __tmp.len()
22580        }
22581    }
22582}
22583#[doc = "id: 323"]
22584#[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
22585#[derive(Debug, Clone, PartialEq)]
22586#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22587#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22588pub struct PARAM_EXT_SET_DATA {
22589    #[doc = "System ID"]
22590    pub target_system: u8,
22591    #[doc = "Component ID"]
22592    pub target_component: u8,
22593    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
22594    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22595    pub param_id: [u8; 16],
22596    #[doc = "Parameter value"]
22597    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22598    pub param_value: [u8; 128],
22599    #[doc = "Parameter type."]
22600    pub param_type: MavParamExtType,
22601}
22602impl PARAM_EXT_SET_DATA {
22603    pub const ENCODED_LEN: usize = 147usize;
22604    pub const DEFAULT: Self = Self {
22605        target_system: 0_u8,
22606        target_component: 0_u8,
22607        param_id: [0_u8; 16usize],
22608        param_value: [0_u8; 128usize],
22609        param_type: MavParamExtType::DEFAULT,
22610    };
22611    #[cfg(feature = "arbitrary")]
22612    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22613        use arbitrary::{Arbitrary, Unstructured};
22614        let mut buf = [0u8; 1024];
22615        rng.fill_bytes(&mut buf);
22616        let mut unstructured = Unstructured::new(&buf);
22617        Self::arbitrary(&mut unstructured).unwrap_or_default()
22618    }
22619}
22620impl Default for PARAM_EXT_SET_DATA {
22621    fn default() -> Self {
22622        Self::DEFAULT.clone()
22623    }
22624}
22625impl MessageData for PARAM_EXT_SET_DATA {
22626    type Message = MavMessage;
22627    const ID: u32 = 323u32;
22628    const NAME: &'static str = "PARAM_EXT_SET";
22629    const EXTRA_CRC: u8 = 78u8;
22630    const ENCODED_LEN: usize = 147usize;
22631    fn deser(
22632        _version: MavlinkVersion,
22633        __input: &[u8],
22634    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22635        let avail_len = __input.len();
22636        let mut payload_buf = [0; Self::ENCODED_LEN];
22637        let mut buf = if avail_len < Self::ENCODED_LEN {
22638            payload_buf[0..avail_len].copy_from_slice(__input);
22639            Bytes::new(&payload_buf)
22640        } else {
22641            Bytes::new(__input)
22642        };
22643        let mut __struct = Self::default();
22644        __struct.target_system = buf.get_u8();
22645        __struct.target_component = buf.get_u8();
22646        for v in &mut __struct.param_id {
22647            let val = buf.get_u8();
22648            *v = val;
22649        }
22650        for v in &mut __struct.param_value {
22651            let val = buf.get_u8();
22652            *v = val;
22653        }
22654        let tmp = buf.get_u8();
22655        __struct.param_type =
22656            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22657                enum_type: "MavParamExtType",
22658                value: tmp as u32,
22659            })?;
22660        Ok(__struct)
22661    }
22662    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22663        let mut __tmp = BytesMut::new(bytes);
22664        #[allow(clippy::absurd_extreme_comparisons)]
22665        #[allow(unused_comparisons)]
22666        if __tmp.remaining() < Self::ENCODED_LEN {
22667            panic!(
22668                "buffer is too small (need {} bytes, but got {})",
22669                Self::ENCODED_LEN,
22670                __tmp.remaining(),
22671            )
22672        }
22673        __tmp.put_u8(self.target_system);
22674        __tmp.put_u8(self.target_component);
22675        for val in &self.param_id {
22676            __tmp.put_u8(*val);
22677        }
22678        for val in &self.param_value {
22679            __tmp.put_u8(*val);
22680        }
22681        __tmp.put_u8(self.param_type as u8);
22682        if matches!(version, MavlinkVersion::V2) {
22683            let len = __tmp.len();
22684            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22685        } else {
22686            __tmp.len()
22687        }
22688    }
22689}
22690#[doc = "id: 322"]
22691#[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
22692#[derive(Debug, Clone, PartialEq)]
22693#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22694#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22695pub struct PARAM_EXT_VALUE_DATA {
22696    #[doc = "Total number of parameters"]
22697    pub param_count: u16,
22698    #[doc = "Index of this parameter"]
22699    pub param_index: u16,
22700    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
22701    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22702    pub param_id: [u8; 16],
22703    #[doc = "Parameter value"]
22704    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22705    pub param_value: [u8; 128],
22706    #[doc = "Parameter type."]
22707    pub param_type: MavParamExtType,
22708}
22709impl PARAM_EXT_VALUE_DATA {
22710    pub const ENCODED_LEN: usize = 149usize;
22711    pub const DEFAULT: Self = Self {
22712        param_count: 0_u16,
22713        param_index: 0_u16,
22714        param_id: [0_u8; 16usize],
22715        param_value: [0_u8; 128usize],
22716        param_type: MavParamExtType::DEFAULT,
22717    };
22718    #[cfg(feature = "arbitrary")]
22719    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22720        use arbitrary::{Arbitrary, Unstructured};
22721        let mut buf = [0u8; 1024];
22722        rng.fill_bytes(&mut buf);
22723        let mut unstructured = Unstructured::new(&buf);
22724        Self::arbitrary(&mut unstructured).unwrap_or_default()
22725    }
22726}
22727impl Default for PARAM_EXT_VALUE_DATA {
22728    fn default() -> Self {
22729        Self::DEFAULT.clone()
22730    }
22731}
22732impl MessageData for PARAM_EXT_VALUE_DATA {
22733    type Message = MavMessage;
22734    const ID: u32 = 322u32;
22735    const NAME: &'static str = "PARAM_EXT_VALUE";
22736    const EXTRA_CRC: u8 = 243u8;
22737    const ENCODED_LEN: usize = 149usize;
22738    fn deser(
22739        _version: MavlinkVersion,
22740        __input: &[u8],
22741    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22742        let avail_len = __input.len();
22743        let mut payload_buf = [0; Self::ENCODED_LEN];
22744        let mut buf = if avail_len < Self::ENCODED_LEN {
22745            payload_buf[0..avail_len].copy_from_slice(__input);
22746            Bytes::new(&payload_buf)
22747        } else {
22748            Bytes::new(__input)
22749        };
22750        let mut __struct = Self::default();
22751        __struct.param_count = buf.get_u16_le();
22752        __struct.param_index = buf.get_u16_le();
22753        for v in &mut __struct.param_id {
22754            let val = buf.get_u8();
22755            *v = val;
22756        }
22757        for v in &mut __struct.param_value {
22758            let val = buf.get_u8();
22759            *v = val;
22760        }
22761        let tmp = buf.get_u8();
22762        __struct.param_type =
22763            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22764                enum_type: "MavParamExtType",
22765                value: tmp as u32,
22766            })?;
22767        Ok(__struct)
22768    }
22769    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22770        let mut __tmp = BytesMut::new(bytes);
22771        #[allow(clippy::absurd_extreme_comparisons)]
22772        #[allow(unused_comparisons)]
22773        if __tmp.remaining() < Self::ENCODED_LEN {
22774            panic!(
22775                "buffer is too small (need {} bytes, but got {})",
22776                Self::ENCODED_LEN,
22777                __tmp.remaining(),
22778            )
22779        }
22780        __tmp.put_u16_le(self.param_count);
22781        __tmp.put_u16_le(self.param_index);
22782        for val in &self.param_id {
22783            __tmp.put_u8(*val);
22784        }
22785        for val in &self.param_value {
22786            __tmp.put_u8(*val);
22787        }
22788        __tmp.put_u8(self.param_type as u8);
22789        if matches!(version, MavlinkVersion::V2) {
22790            let len = __tmp.len();
22791            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22792        } else {
22793            __tmp.len()
22794        }
22795    }
22796}
22797#[doc = "id: 50"]
22798#[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
22799#[derive(Debug, Clone, PartialEq)]
22800#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22801#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22802pub struct PARAM_MAP_RC_DATA {
22803    #[doc = "Initial parameter value"]
22804    pub param_value0: f32,
22805    #[doc = "Scale, maps the RC range [-1, 1] to a parameter value"]
22806    pub scale: f32,
22807    #[doc = "Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation)"]
22808    pub param_value_min: f32,
22809    #[doc = "Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation)"]
22810    pub param_value_max: f32,
22811    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index."]
22812    pub param_index: i16,
22813    #[doc = "System ID"]
22814    pub target_system: u8,
22815    #[doc = "Component ID"]
22816    pub target_component: u8,
22817    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
22818    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22819    pub param_id: [u8; 16],
22820    #[doc = "Index of parameter RC channel. Not equal to the RC channel id. Typically corresponds to a potentiometer-knob on the RC."]
22821    pub parameter_rc_channel_index: u8,
22822}
22823impl PARAM_MAP_RC_DATA {
22824    pub const ENCODED_LEN: usize = 37usize;
22825    pub const DEFAULT: Self = Self {
22826        param_value0: 0.0_f32,
22827        scale: 0.0_f32,
22828        param_value_min: 0.0_f32,
22829        param_value_max: 0.0_f32,
22830        param_index: 0_i16,
22831        target_system: 0_u8,
22832        target_component: 0_u8,
22833        param_id: [0_u8; 16usize],
22834        parameter_rc_channel_index: 0_u8,
22835    };
22836    #[cfg(feature = "arbitrary")]
22837    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22838        use arbitrary::{Arbitrary, Unstructured};
22839        let mut buf = [0u8; 1024];
22840        rng.fill_bytes(&mut buf);
22841        let mut unstructured = Unstructured::new(&buf);
22842        Self::arbitrary(&mut unstructured).unwrap_or_default()
22843    }
22844}
22845impl Default for PARAM_MAP_RC_DATA {
22846    fn default() -> Self {
22847        Self::DEFAULT.clone()
22848    }
22849}
22850impl MessageData for PARAM_MAP_RC_DATA {
22851    type Message = MavMessage;
22852    const ID: u32 = 50u32;
22853    const NAME: &'static str = "PARAM_MAP_RC";
22854    const EXTRA_CRC: u8 = 78u8;
22855    const ENCODED_LEN: usize = 37usize;
22856    fn deser(
22857        _version: MavlinkVersion,
22858        __input: &[u8],
22859    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22860        let avail_len = __input.len();
22861        let mut payload_buf = [0; Self::ENCODED_LEN];
22862        let mut buf = if avail_len < Self::ENCODED_LEN {
22863            payload_buf[0..avail_len].copy_from_slice(__input);
22864            Bytes::new(&payload_buf)
22865        } else {
22866            Bytes::new(__input)
22867        };
22868        let mut __struct = Self::default();
22869        __struct.param_value0 = buf.get_f32_le();
22870        __struct.scale = buf.get_f32_le();
22871        __struct.param_value_min = buf.get_f32_le();
22872        __struct.param_value_max = buf.get_f32_le();
22873        __struct.param_index = buf.get_i16_le();
22874        __struct.target_system = buf.get_u8();
22875        __struct.target_component = buf.get_u8();
22876        for v in &mut __struct.param_id {
22877            let val = buf.get_u8();
22878            *v = val;
22879        }
22880        __struct.parameter_rc_channel_index = buf.get_u8();
22881        Ok(__struct)
22882    }
22883    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22884        let mut __tmp = BytesMut::new(bytes);
22885        #[allow(clippy::absurd_extreme_comparisons)]
22886        #[allow(unused_comparisons)]
22887        if __tmp.remaining() < Self::ENCODED_LEN {
22888            panic!(
22889                "buffer is too small (need {} bytes, but got {})",
22890                Self::ENCODED_LEN,
22891                __tmp.remaining(),
22892            )
22893        }
22894        __tmp.put_f32_le(self.param_value0);
22895        __tmp.put_f32_le(self.scale);
22896        __tmp.put_f32_le(self.param_value_min);
22897        __tmp.put_f32_le(self.param_value_max);
22898        __tmp.put_i16_le(self.param_index);
22899        __tmp.put_u8(self.target_system);
22900        __tmp.put_u8(self.target_component);
22901        for val in &self.param_id {
22902            __tmp.put_u8(*val);
22903        }
22904        __tmp.put_u8(self.parameter_rc_channel_index);
22905        if matches!(version, MavlinkVersion::V2) {
22906            let len = __tmp.len();
22907            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22908        } else {
22909            __tmp.len()
22910        }
22911    }
22912}
22913#[doc = "id: 21"]
22914#[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
22915#[derive(Debug, Clone, PartialEq)]
22916#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22917#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22918pub struct PARAM_REQUEST_LIST_DATA {
22919    #[doc = "System ID"]
22920    pub target_system: u8,
22921    #[doc = "Component ID"]
22922    pub target_component: u8,
22923}
22924impl PARAM_REQUEST_LIST_DATA {
22925    pub const ENCODED_LEN: usize = 2usize;
22926    pub const DEFAULT: Self = Self {
22927        target_system: 0_u8,
22928        target_component: 0_u8,
22929    };
22930    #[cfg(feature = "arbitrary")]
22931    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22932        use arbitrary::{Arbitrary, Unstructured};
22933        let mut buf = [0u8; 1024];
22934        rng.fill_bytes(&mut buf);
22935        let mut unstructured = Unstructured::new(&buf);
22936        Self::arbitrary(&mut unstructured).unwrap_or_default()
22937    }
22938}
22939impl Default for PARAM_REQUEST_LIST_DATA {
22940    fn default() -> Self {
22941        Self::DEFAULT.clone()
22942    }
22943}
22944impl MessageData for PARAM_REQUEST_LIST_DATA {
22945    type Message = MavMessage;
22946    const ID: u32 = 21u32;
22947    const NAME: &'static str = "PARAM_REQUEST_LIST";
22948    const EXTRA_CRC: u8 = 159u8;
22949    const ENCODED_LEN: usize = 2usize;
22950    fn deser(
22951        _version: MavlinkVersion,
22952        __input: &[u8],
22953    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22954        let avail_len = __input.len();
22955        let mut payload_buf = [0; Self::ENCODED_LEN];
22956        let mut buf = if avail_len < Self::ENCODED_LEN {
22957            payload_buf[0..avail_len].copy_from_slice(__input);
22958            Bytes::new(&payload_buf)
22959        } else {
22960            Bytes::new(__input)
22961        };
22962        let mut __struct = Self::default();
22963        __struct.target_system = buf.get_u8();
22964        __struct.target_component = buf.get_u8();
22965        Ok(__struct)
22966    }
22967    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22968        let mut __tmp = BytesMut::new(bytes);
22969        #[allow(clippy::absurd_extreme_comparisons)]
22970        #[allow(unused_comparisons)]
22971        if __tmp.remaining() < Self::ENCODED_LEN {
22972            panic!(
22973                "buffer is too small (need {} bytes, but got {})",
22974                Self::ENCODED_LEN,
22975                __tmp.remaining(),
22976            )
22977        }
22978        __tmp.put_u8(self.target_system);
22979        __tmp.put_u8(self.target_component);
22980        if matches!(version, MavlinkVersion::V2) {
22981            let len = __tmp.len();
22982            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22983        } else {
22984            __tmp.len()
22985        }
22986    }
22987}
22988#[doc = "id: 20"]
22989#[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
22990#[derive(Debug, Clone, PartialEq)]
22991#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22992#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22993pub struct PARAM_REQUEST_READ_DATA {
22994    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored)"]
22995    pub param_index: i16,
22996    #[doc = "System ID"]
22997    pub target_system: u8,
22998    #[doc = "Component ID"]
22999    pub target_component: u8,
23000    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23001    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23002    pub param_id: [u8; 16],
23003}
23004impl PARAM_REQUEST_READ_DATA {
23005    pub const ENCODED_LEN: usize = 20usize;
23006    pub const DEFAULT: Self = Self {
23007        param_index: 0_i16,
23008        target_system: 0_u8,
23009        target_component: 0_u8,
23010        param_id: [0_u8; 16usize],
23011    };
23012    #[cfg(feature = "arbitrary")]
23013    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23014        use arbitrary::{Arbitrary, Unstructured};
23015        let mut buf = [0u8; 1024];
23016        rng.fill_bytes(&mut buf);
23017        let mut unstructured = Unstructured::new(&buf);
23018        Self::arbitrary(&mut unstructured).unwrap_or_default()
23019    }
23020}
23021impl Default for PARAM_REQUEST_READ_DATA {
23022    fn default() -> Self {
23023        Self::DEFAULT.clone()
23024    }
23025}
23026impl MessageData for PARAM_REQUEST_READ_DATA {
23027    type Message = MavMessage;
23028    const ID: u32 = 20u32;
23029    const NAME: &'static str = "PARAM_REQUEST_READ";
23030    const EXTRA_CRC: u8 = 214u8;
23031    const ENCODED_LEN: usize = 20usize;
23032    fn deser(
23033        _version: MavlinkVersion,
23034        __input: &[u8],
23035    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23036        let avail_len = __input.len();
23037        let mut payload_buf = [0; Self::ENCODED_LEN];
23038        let mut buf = if avail_len < Self::ENCODED_LEN {
23039            payload_buf[0..avail_len].copy_from_slice(__input);
23040            Bytes::new(&payload_buf)
23041        } else {
23042            Bytes::new(__input)
23043        };
23044        let mut __struct = Self::default();
23045        __struct.param_index = buf.get_i16_le();
23046        __struct.target_system = buf.get_u8();
23047        __struct.target_component = buf.get_u8();
23048        for v in &mut __struct.param_id {
23049            let val = buf.get_u8();
23050            *v = val;
23051        }
23052        Ok(__struct)
23053    }
23054    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23055        let mut __tmp = BytesMut::new(bytes);
23056        #[allow(clippy::absurd_extreme_comparisons)]
23057        #[allow(unused_comparisons)]
23058        if __tmp.remaining() < Self::ENCODED_LEN {
23059            panic!(
23060                "buffer is too small (need {} bytes, but got {})",
23061                Self::ENCODED_LEN,
23062                __tmp.remaining(),
23063            )
23064        }
23065        __tmp.put_i16_le(self.param_index);
23066        __tmp.put_u8(self.target_system);
23067        __tmp.put_u8(self.target_component);
23068        for val in &self.param_id {
23069            __tmp.put_u8(*val);
23070        }
23071        if matches!(version, MavlinkVersion::V2) {
23072            let len = __tmp.len();
23073            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23074        } else {
23075            __tmp.len()
23076        }
23077    }
23078}
23079#[doc = "id: 23"]
23080#[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
23081#[derive(Debug, Clone, PartialEq)]
23082#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23083#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23084pub struct PARAM_SET_DATA {
23085    #[doc = "Onboard parameter value"]
23086    pub param_value: f32,
23087    #[doc = "System ID"]
23088    pub target_system: u8,
23089    #[doc = "Component ID"]
23090    pub target_component: u8,
23091    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23092    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23093    pub param_id: [u8; 16],
23094    #[doc = "Onboard parameter type."]
23095    pub param_type: MavParamType,
23096}
23097impl PARAM_SET_DATA {
23098    pub const ENCODED_LEN: usize = 23usize;
23099    pub const DEFAULT: Self = Self {
23100        param_value: 0.0_f32,
23101        target_system: 0_u8,
23102        target_component: 0_u8,
23103        param_id: [0_u8; 16usize],
23104        param_type: MavParamType::DEFAULT,
23105    };
23106    #[cfg(feature = "arbitrary")]
23107    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23108        use arbitrary::{Arbitrary, Unstructured};
23109        let mut buf = [0u8; 1024];
23110        rng.fill_bytes(&mut buf);
23111        let mut unstructured = Unstructured::new(&buf);
23112        Self::arbitrary(&mut unstructured).unwrap_or_default()
23113    }
23114}
23115impl Default for PARAM_SET_DATA {
23116    fn default() -> Self {
23117        Self::DEFAULT.clone()
23118    }
23119}
23120impl MessageData for PARAM_SET_DATA {
23121    type Message = MavMessage;
23122    const ID: u32 = 23u32;
23123    const NAME: &'static str = "PARAM_SET";
23124    const EXTRA_CRC: u8 = 168u8;
23125    const ENCODED_LEN: usize = 23usize;
23126    fn deser(
23127        _version: MavlinkVersion,
23128        __input: &[u8],
23129    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23130        let avail_len = __input.len();
23131        let mut payload_buf = [0; Self::ENCODED_LEN];
23132        let mut buf = if avail_len < Self::ENCODED_LEN {
23133            payload_buf[0..avail_len].copy_from_slice(__input);
23134            Bytes::new(&payload_buf)
23135        } else {
23136            Bytes::new(__input)
23137        };
23138        let mut __struct = Self::default();
23139        __struct.param_value = buf.get_f32_le();
23140        __struct.target_system = buf.get_u8();
23141        __struct.target_component = buf.get_u8();
23142        for v in &mut __struct.param_id {
23143            let val = buf.get_u8();
23144            *v = val;
23145        }
23146        let tmp = buf.get_u8();
23147        __struct.param_type =
23148            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23149                enum_type: "MavParamType",
23150                value: tmp as u32,
23151            })?;
23152        Ok(__struct)
23153    }
23154    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23155        let mut __tmp = BytesMut::new(bytes);
23156        #[allow(clippy::absurd_extreme_comparisons)]
23157        #[allow(unused_comparisons)]
23158        if __tmp.remaining() < Self::ENCODED_LEN {
23159            panic!(
23160                "buffer is too small (need {} bytes, but got {})",
23161                Self::ENCODED_LEN,
23162                __tmp.remaining(),
23163            )
23164        }
23165        __tmp.put_f32_le(self.param_value);
23166        __tmp.put_u8(self.target_system);
23167        __tmp.put_u8(self.target_component);
23168        for val in &self.param_id {
23169            __tmp.put_u8(*val);
23170        }
23171        __tmp.put_u8(self.param_type as u8);
23172        if matches!(version, MavlinkVersion::V2) {
23173            let len = __tmp.len();
23174            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23175        } else {
23176            __tmp.len()
23177        }
23178    }
23179}
23180#[doc = "id: 22"]
23181#[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
23182#[derive(Debug, Clone, PartialEq)]
23183#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23184#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23185pub struct PARAM_VALUE_DATA {
23186    #[doc = "Onboard parameter value"]
23187    pub param_value: f32,
23188    #[doc = "Total number of onboard parameters"]
23189    pub param_count: u16,
23190    #[doc = "Index of this onboard parameter"]
23191    pub param_index: u16,
23192    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23193    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23194    pub param_id: [u8; 16],
23195    #[doc = "Onboard parameter type."]
23196    pub param_type: MavParamType,
23197}
23198impl PARAM_VALUE_DATA {
23199    pub const ENCODED_LEN: usize = 25usize;
23200    pub const DEFAULT: Self = Self {
23201        param_value: 0.0_f32,
23202        param_count: 0_u16,
23203        param_index: 0_u16,
23204        param_id: [0_u8; 16usize],
23205        param_type: MavParamType::DEFAULT,
23206    };
23207    #[cfg(feature = "arbitrary")]
23208    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23209        use arbitrary::{Arbitrary, Unstructured};
23210        let mut buf = [0u8; 1024];
23211        rng.fill_bytes(&mut buf);
23212        let mut unstructured = Unstructured::new(&buf);
23213        Self::arbitrary(&mut unstructured).unwrap_or_default()
23214    }
23215}
23216impl Default for PARAM_VALUE_DATA {
23217    fn default() -> Self {
23218        Self::DEFAULT.clone()
23219    }
23220}
23221impl MessageData for PARAM_VALUE_DATA {
23222    type Message = MavMessage;
23223    const ID: u32 = 22u32;
23224    const NAME: &'static str = "PARAM_VALUE";
23225    const EXTRA_CRC: u8 = 220u8;
23226    const ENCODED_LEN: usize = 25usize;
23227    fn deser(
23228        _version: MavlinkVersion,
23229        __input: &[u8],
23230    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23231        let avail_len = __input.len();
23232        let mut payload_buf = [0; Self::ENCODED_LEN];
23233        let mut buf = if avail_len < Self::ENCODED_LEN {
23234            payload_buf[0..avail_len].copy_from_slice(__input);
23235            Bytes::new(&payload_buf)
23236        } else {
23237            Bytes::new(__input)
23238        };
23239        let mut __struct = Self::default();
23240        __struct.param_value = buf.get_f32_le();
23241        __struct.param_count = buf.get_u16_le();
23242        __struct.param_index = buf.get_u16_le();
23243        for v in &mut __struct.param_id {
23244            let val = buf.get_u8();
23245            *v = val;
23246        }
23247        let tmp = buf.get_u8();
23248        __struct.param_type =
23249            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23250                enum_type: "MavParamType",
23251                value: tmp as u32,
23252            })?;
23253        Ok(__struct)
23254    }
23255    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23256        let mut __tmp = BytesMut::new(bytes);
23257        #[allow(clippy::absurd_extreme_comparisons)]
23258        #[allow(unused_comparisons)]
23259        if __tmp.remaining() < Self::ENCODED_LEN {
23260            panic!(
23261                "buffer is too small (need {} bytes, but got {})",
23262                Self::ENCODED_LEN,
23263                __tmp.remaining(),
23264            )
23265        }
23266        __tmp.put_f32_le(self.param_value);
23267        __tmp.put_u16_le(self.param_count);
23268        __tmp.put_u16_le(self.param_index);
23269        for val in &self.param_id {
23270            __tmp.put_u8(*val);
23271        }
23272        __tmp.put_u8(self.param_type as u8);
23273        if matches!(version, MavlinkVersion::V2) {
23274            let len = __tmp.len();
23275            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23276        } else {
23277            __tmp.len()
23278        }
23279    }
23280}
23281#[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
23282#[doc = "id: 4"]
23283#[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
23284#[derive(Debug, Clone, PartialEq)]
23285#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23286#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23287pub struct PING_DATA {
23288    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23289    pub time_usec: u64,
23290    #[doc = "PING sequence"]
23291    pub seq: u32,
23292    #[doc = "0: request ping from all receiving systems. If greater than 0: message is a ping response and number is the system id of the requesting system"]
23293    pub target_system: u8,
23294    #[doc = "0: request ping from all receiving components. If greater than 0: message is a ping response and number is the component id of the requesting component."]
23295    pub target_component: u8,
23296}
23297impl PING_DATA {
23298    pub const ENCODED_LEN: usize = 14usize;
23299    pub const DEFAULT: Self = Self {
23300        time_usec: 0_u64,
23301        seq: 0_u32,
23302        target_system: 0_u8,
23303        target_component: 0_u8,
23304    };
23305    #[cfg(feature = "arbitrary")]
23306    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23307        use arbitrary::{Arbitrary, Unstructured};
23308        let mut buf = [0u8; 1024];
23309        rng.fill_bytes(&mut buf);
23310        let mut unstructured = Unstructured::new(&buf);
23311        Self::arbitrary(&mut unstructured).unwrap_or_default()
23312    }
23313}
23314impl Default for PING_DATA {
23315    fn default() -> Self {
23316        Self::DEFAULT.clone()
23317    }
23318}
23319impl MessageData for PING_DATA {
23320    type Message = MavMessage;
23321    const ID: u32 = 4u32;
23322    const NAME: &'static str = "PING";
23323    const EXTRA_CRC: u8 = 237u8;
23324    const ENCODED_LEN: usize = 14usize;
23325    fn deser(
23326        _version: MavlinkVersion,
23327        __input: &[u8],
23328    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23329        let avail_len = __input.len();
23330        let mut payload_buf = [0; Self::ENCODED_LEN];
23331        let mut buf = if avail_len < Self::ENCODED_LEN {
23332            payload_buf[0..avail_len].copy_from_slice(__input);
23333            Bytes::new(&payload_buf)
23334        } else {
23335            Bytes::new(__input)
23336        };
23337        let mut __struct = Self::default();
23338        __struct.time_usec = buf.get_u64_le();
23339        __struct.seq = buf.get_u32_le();
23340        __struct.target_system = buf.get_u8();
23341        __struct.target_component = buf.get_u8();
23342        Ok(__struct)
23343    }
23344    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23345        let mut __tmp = BytesMut::new(bytes);
23346        #[allow(clippy::absurd_extreme_comparisons)]
23347        #[allow(unused_comparisons)]
23348        if __tmp.remaining() < Self::ENCODED_LEN {
23349            panic!(
23350                "buffer is too small (need {} bytes, but got {})",
23351                Self::ENCODED_LEN,
23352                __tmp.remaining(),
23353            )
23354        }
23355        __tmp.put_u64_le(self.time_usec);
23356        __tmp.put_u32_le(self.seq);
23357        __tmp.put_u8(self.target_system);
23358        __tmp.put_u8(self.target_component);
23359        if matches!(version, MavlinkVersion::V2) {
23360            let len = __tmp.len();
23361            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23362        } else {
23363            __tmp.len()
23364        }
23365    }
23366}
23367#[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
23368#[doc = "id: 258"]
23369#[doc = "Control vehicle tone generation (buzzer)."]
23370#[derive(Debug, Clone, PartialEq)]
23371#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23372#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23373pub struct PLAY_TUNE_DATA {
23374    #[doc = "System ID"]
23375    pub target_system: u8,
23376    #[doc = "Component ID"]
23377    pub target_component: u8,
23378    #[doc = "tune in board specific format"]
23379    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23380    pub tune: [u8; 30],
23381    #[doc = "tune extension (appended to tune)"]
23382    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23383    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23384    pub tune2: [u8; 200],
23385}
23386impl PLAY_TUNE_DATA {
23387    pub const ENCODED_LEN: usize = 232usize;
23388    pub const DEFAULT: Self = Self {
23389        target_system: 0_u8,
23390        target_component: 0_u8,
23391        tune: [0_u8; 30usize],
23392        tune2: [0_u8; 200usize],
23393    };
23394    #[cfg(feature = "arbitrary")]
23395    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23396        use arbitrary::{Arbitrary, Unstructured};
23397        let mut buf = [0u8; 1024];
23398        rng.fill_bytes(&mut buf);
23399        let mut unstructured = Unstructured::new(&buf);
23400        Self::arbitrary(&mut unstructured).unwrap_or_default()
23401    }
23402}
23403impl Default for PLAY_TUNE_DATA {
23404    fn default() -> Self {
23405        Self::DEFAULT.clone()
23406    }
23407}
23408impl MessageData for PLAY_TUNE_DATA {
23409    type Message = MavMessage;
23410    const ID: u32 = 258u32;
23411    const NAME: &'static str = "PLAY_TUNE";
23412    const EXTRA_CRC: u8 = 187u8;
23413    const ENCODED_LEN: usize = 232usize;
23414    fn deser(
23415        _version: MavlinkVersion,
23416        __input: &[u8],
23417    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23418        let avail_len = __input.len();
23419        let mut payload_buf = [0; Self::ENCODED_LEN];
23420        let mut buf = if avail_len < Self::ENCODED_LEN {
23421            payload_buf[0..avail_len].copy_from_slice(__input);
23422            Bytes::new(&payload_buf)
23423        } else {
23424            Bytes::new(__input)
23425        };
23426        let mut __struct = Self::default();
23427        __struct.target_system = buf.get_u8();
23428        __struct.target_component = buf.get_u8();
23429        for v in &mut __struct.tune {
23430            let val = buf.get_u8();
23431            *v = val;
23432        }
23433        for v in &mut __struct.tune2 {
23434            let val = buf.get_u8();
23435            *v = val;
23436        }
23437        Ok(__struct)
23438    }
23439    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23440        let mut __tmp = BytesMut::new(bytes);
23441        #[allow(clippy::absurd_extreme_comparisons)]
23442        #[allow(unused_comparisons)]
23443        if __tmp.remaining() < Self::ENCODED_LEN {
23444            panic!(
23445                "buffer is too small (need {} bytes, but got {})",
23446                Self::ENCODED_LEN,
23447                __tmp.remaining(),
23448            )
23449        }
23450        __tmp.put_u8(self.target_system);
23451        __tmp.put_u8(self.target_component);
23452        for val in &self.tune {
23453            __tmp.put_u8(*val);
23454        }
23455        for val in &self.tune2 {
23456            __tmp.put_u8(*val);
23457        }
23458        if matches!(version, MavlinkVersion::V2) {
23459            let len = __tmp.len();
23460            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23461        } else {
23462            __tmp.len()
23463        }
23464    }
23465}
23466#[doc = "id: 400"]
23467#[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
23468#[derive(Debug, Clone, PartialEq)]
23469#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23470#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23471pub struct PLAY_TUNE_V2_DATA {
23472    #[doc = "Tune format"]
23473    pub format: TuneFormat,
23474    #[doc = "System ID"]
23475    pub target_system: u8,
23476    #[doc = "Component ID"]
23477    pub target_component: u8,
23478    #[doc = "Tune definition as a NULL-terminated string."]
23479    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23480    pub tune: [u8; 248],
23481}
23482impl PLAY_TUNE_V2_DATA {
23483    pub const ENCODED_LEN: usize = 254usize;
23484    pub const DEFAULT: Self = Self {
23485        format: TuneFormat::DEFAULT,
23486        target_system: 0_u8,
23487        target_component: 0_u8,
23488        tune: [0_u8; 248usize],
23489    };
23490    #[cfg(feature = "arbitrary")]
23491    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23492        use arbitrary::{Arbitrary, Unstructured};
23493        let mut buf = [0u8; 1024];
23494        rng.fill_bytes(&mut buf);
23495        let mut unstructured = Unstructured::new(&buf);
23496        Self::arbitrary(&mut unstructured).unwrap_or_default()
23497    }
23498}
23499impl Default for PLAY_TUNE_V2_DATA {
23500    fn default() -> Self {
23501        Self::DEFAULT.clone()
23502    }
23503}
23504impl MessageData for PLAY_TUNE_V2_DATA {
23505    type Message = MavMessage;
23506    const ID: u32 = 400u32;
23507    const NAME: &'static str = "PLAY_TUNE_V2";
23508    const EXTRA_CRC: u8 = 110u8;
23509    const ENCODED_LEN: usize = 254usize;
23510    fn deser(
23511        _version: MavlinkVersion,
23512        __input: &[u8],
23513    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23514        let avail_len = __input.len();
23515        let mut payload_buf = [0; Self::ENCODED_LEN];
23516        let mut buf = if avail_len < Self::ENCODED_LEN {
23517            payload_buf[0..avail_len].copy_from_slice(__input);
23518            Bytes::new(&payload_buf)
23519        } else {
23520            Bytes::new(__input)
23521        };
23522        let mut __struct = Self::default();
23523        let tmp = buf.get_u32_le();
23524        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
23525            ::mavlink_core::error::ParserError::InvalidEnum {
23526                enum_type: "TuneFormat",
23527                value: tmp as u32,
23528            },
23529        )?;
23530        __struct.target_system = buf.get_u8();
23531        __struct.target_component = buf.get_u8();
23532        for v in &mut __struct.tune {
23533            let val = buf.get_u8();
23534            *v = val;
23535        }
23536        Ok(__struct)
23537    }
23538    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23539        let mut __tmp = BytesMut::new(bytes);
23540        #[allow(clippy::absurd_extreme_comparisons)]
23541        #[allow(unused_comparisons)]
23542        if __tmp.remaining() < Self::ENCODED_LEN {
23543            panic!(
23544                "buffer is too small (need {} bytes, but got {})",
23545                Self::ENCODED_LEN,
23546                __tmp.remaining(),
23547            )
23548        }
23549        __tmp.put_u32_le(self.format as u32);
23550        __tmp.put_u8(self.target_system);
23551        __tmp.put_u8(self.target_component);
23552        for val in &self.tune {
23553            __tmp.put_u8(*val);
23554        }
23555        if matches!(version, MavlinkVersion::V2) {
23556            let len = __tmp.len();
23557            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23558        } else {
23559            __tmp.len()
23560        }
23561    }
23562}
23563#[doc = "id: 87"]
23564#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
23565#[derive(Debug, Clone, PartialEq)]
23566#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23567#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23568pub struct POSITION_TARGET_GLOBAL_INT_DATA {
23569    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
23570    pub time_boot_ms: u32,
23571    #[doc = "Latitude in WGS84 frame"]
23572    pub lat_int: i32,
23573    #[doc = "Longitude in WGS84 frame"]
23574    pub lon_int: i32,
23575    #[doc = "Altitude (MSL, AGL or relative to home altitude, depending on frame)"]
23576    pub alt: f32,
23577    #[doc = "X velocity in NED frame"]
23578    pub vx: f32,
23579    #[doc = "Y velocity in NED frame"]
23580    pub vy: f32,
23581    #[doc = "Z velocity in NED frame"]
23582    pub vz: f32,
23583    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
23584    pub afx: f32,
23585    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
23586    pub afy: f32,
23587    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
23588    pub afz: f32,
23589    #[doc = "yaw setpoint"]
23590    pub yaw: f32,
23591    #[doc = "yaw rate setpoint"]
23592    pub yaw_rate: f32,
23593    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
23594    pub type_mask: PositionTargetTypemask,
23595    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
23596    pub coordinate_frame: MavFrame,
23597}
23598impl POSITION_TARGET_GLOBAL_INT_DATA {
23599    pub const ENCODED_LEN: usize = 51usize;
23600    pub const DEFAULT: Self = Self {
23601        time_boot_ms: 0_u32,
23602        lat_int: 0_i32,
23603        lon_int: 0_i32,
23604        alt: 0.0_f32,
23605        vx: 0.0_f32,
23606        vy: 0.0_f32,
23607        vz: 0.0_f32,
23608        afx: 0.0_f32,
23609        afy: 0.0_f32,
23610        afz: 0.0_f32,
23611        yaw: 0.0_f32,
23612        yaw_rate: 0.0_f32,
23613        type_mask: PositionTargetTypemask::DEFAULT,
23614        coordinate_frame: MavFrame::DEFAULT,
23615    };
23616    #[cfg(feature = "arbitrary")]
23617    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23618        use arbitrary::{Arbitrary, Unstructured};
23619        let mut buf = [0u8; 1024];
23620        rng.fill_bytes(&mut buf);
23621        let mut unstructured = Unstructured::new(&buf);
23622        Self::arbitrary(&mut unstructured).unwrap_or_default()
23623    }
23624}
23625impl Default for POSITION_TARGET_GLOBAL_INT_DATA {
23626    fn default() -> Self {
23627        Self::DEFAULT.clone()
23628    }
23629}
23630impl MessageData for POSITION_TARGET_GLOBAL_INT_DATA {
23631    type Message = MavMessage;
23632    const ID: u32 = 87u32;
23633    const NAME: &'static str = "POSITION_TARGET_GLOBAL_INT";
23634    const EXTRA_CRC: u8 = 150u8;
23635    const ENCODED_LEN: usize = 51usize;
23636    fn deser(
23637        _version: MavlinkVersion,
23638        __input: &[u8],
23639    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23640        let avail_len = __input.len();
23641        let mut payload_buf = [0; Self::ENCODED_LEN];
23642        let mut buf = if avail_len < Self::ENCODED_LEN {
23643            payload_buf[0..avail_len].copy_from_slice(__input);
23644            Bytes::new(&payload_buf)
23645        } else {
23646            Bytes::new(__input)
23647        };
23648        let mut __struct = Self::default();
23649        __struct.time_boot_ms = buf.get_u32_le();
23650        __struct.lat_int = buf.get_i32_le();
23651        __struct.lon_int = buf.get_i32_le();
23652        __struct.alt = buf.get_f32_le();
23653        __struct.vx = buf.get_f32_le();
23654        __struct.vy = buf.get_f32_le();
23655        __struct.vz = buf.get_f32_le();
23656        __struct.afx = buf.get_f32_le();
23657        __struct.afy = buf.get_f32_le();
23658        __struct.afz = buf.get_f32_le();
23659        __struct.yaw = buf.get_f32_le();
23660        __struct.yaw_rate = buf.get_f32_le();
23661        let tmp = buf.get_u16_le();
23662        __struct.type_mask = PositionTargetTypemask::from_bits(
23663            tmp & PositionTargetTypemask::all().bits(),
23664        )
23665        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
23666            flag_type: "PositionTargetTypemask",
23667            value: tmp as u32,
23668        })?;
23669        let tmp = buf.get_u8();
23670        __struct.coordinate_frame =
23671            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23672                enum_type: "MavFrame",
23673                value: tmp as u32,
23674            })?;
23675        Ok(__struct)
23676    }
23677    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23678        let mut __tmp = BytesMut::new(bytes);
23679        #[allow(clippy::absurd_extreme_comparisons)]
23680        #[allow(unused_comparisons)]
23681        if __tmp.remaining() < Self::ENCODED_LEN {
23682            panic!(
23683                "buffer is too small (need {} bytes, but got {})",
23684                Self::ENCODED_LEN,
23685                __tmp.remaining(),
23686            )
23687        }
23688        __tmp.put_u32_le(self.time_boot_ms);
23689        __tmp.put_i32_le(self.lat_int);
23690        __tmp.put_i32_le(self.lon_int);
23691        __tmp.put_f32_le(self.alt);
23692        __tmp.put_f32_le(self.vx);
23693        __tmp.put_f32_le(self.vy);
23694        __tmp.put_f32_le(self.vz);
23695        __tmp.put_f32_le(self.afx);
23696        __tmp.put_f32_le(self.afy);
23697        __tmp.put_f32_le(self.afz);
23698        __tmp.put_f32_le(self.yaw);
23699        __tmp.put_f32_le(self.yaw_rate);
23700        __tmp.put_u16_le(self.type_mask.bits());
23701        __tmp.put_u8(self.coordinate_frame as u8);
23702        if matches!(version, MavlinkVersion::V2) {
23703            let len = __tmp.len();
23704            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23705        } else {
23706            __tmp.len()
23707        }
23708    }
23709}
23710#[doc = "id: 85"]
23711#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
23712#[derive(Debug, Clone, PartialEq)]
23713#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23714#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23715pub struct POSITION_TARGET_LOCAL_NED_DATA {
23716    #[doc = "Timestamp (time since system boot)."]
23717    pub time_boot_ms: u32,
23718    #[doc = "X Position in NED frame"]
23719    pub x: f32,
23720    #[doc = "Y Position in NED frame"]
23721    pub y: f32,
23722    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
23723    pub z: f32,
23724    #[doc = "X velocity in NED frame"]
23725    pub vx: f32,
23726    #[doc = "Y velocity in NED frame"]
23727    pub vy: f32,
23728    #[doc = "Z velocity in NED frame"]
23729    pub vz: f32,
23730    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
23731    pub afx: f32,
23732    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
23733    pub afy: f32,
23734    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
23735    pub afz: f32,
23736    #[doc = "yaw setpoint"]
23737    pub yaw: f32,
23738    #[doc = "yaw rate setpoint"]
23739    pub yaw_rate: f32,
23740    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
23741    pub type_mask: PositionTargetTypemask,
23742    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
23743    pub coordinate_frame: MavFrame,
23744}
23745impl POSITION_TARGET_LOCAL_NED_DATA {
23746    pub const ENCODED_LEN: usize = 51usize;
23747    pub const DEFAULT: Self = Self {
23748        time_boot_ms: 0_u32,
23749        x: 0.0_f32,
23750        y: 0.0_f32,
23751        z: 0.0_f32,
23752        vx: 0.0_f32,
23753        vy: 0.0_f32,
23754        vz: 0.0_f32,
23755        afx: 0.0_f32,
23756        afy: 0.0_f32,
23757        afz: 0.0_f32,
23758        yaw: 0.0_f32,
23759        yaw_rate: 0.0_f32,
23760        type_mask: PositionTargetTypemask::DEFAULT,
23761        coordinate_frame: MavFrame::DEFAULT,
23762    };
23763    #[cfg(feature = "arbitrary")]
23764    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23765        use arbitrary::{Arbitrary, Unstructured};
23766        let mut buf = [0u8; 1024];
23767        rng.fill_bytes(&mut buf);
23768        let mut unstructured = Unstructured::new(&buf);
23769        Self::arbitrary(&mut unstructured).unwrap_or_default()
23770    }
23771}
23772impl Default for POSITION_TARGET_LOCAL_NED_DATA {
23773    fn default() -> Self {
23774        Self::DEFAULT.clone()
23775    }
23776}
23777impl MessageData for POSITION_TARGET_LOCAL_NED_DATA {
23778    type Message = MavMessage;
23779    const ID: u32 = 85u32;
23780    const NAME: &'static str = "POSITION_TARGET_LOCAL_NED";
23781    const EXTRA_CRC: u8 = 140u8;
23782    const ENCODED_LEN: usize = 51usize;
23783    fn deser(
23784        _version: MavlinkVersion,
23785        __input: &[u8],
23786    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23787        let avail_len = __input.len();
23788        let mut payload_buf = [0; Self::ENCODED_LEN];
23789        let mut buf = if avail_len < Self::ENCODED_LEN {
23790            payload_buf[0..avail_len].copy_from_slice(__input);
23791            Bytes::new(&payload_buf)
23792        } else {
23793            Bytes::new(__input)
23794        };
23795        let mut __struct = Self::default();
23796        __struct.time_boot_ms = buf.get_u32_le();
23797        __struct.x = buf.get_f32_le();
23798        __struct.y = buf.get_f32_le();
23799        __struct.z = buf.get_f32_le();
23800        __struct.vx = buf.get_f32_le();
23801        __struct.vy = buf.get_f32_le();
23802        __struct.vz = buf.get_f32_le();
23803        __struct.afx = buf.get_f32_le();
23804        __struct.afy = buf.get_f32_le();
23805        __struct.afz = buf.get_f32_le();
23806        __struct.yaw = buf.get_f32_le();
23807        __struct.yaw_rate = buf.get_f32_le();
23808        let tmp = buf.get_u16_le();
23809        __struct.type_mask = PositionTargetTypemask::from_bits(
23810            tmp & PositionTargetTypemask::all().bits(),
23811        )
23812        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
23813            flag_type: "PositionTargetTypemask",
23814            value: tmp as u32,
23815        })?;
23816        let tmp = buf.get_u8();
23817        __struct.coordinate_frame =
23818            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23819                enum_type: "MavFrame",
23820                value: tmp as u32,
23821            })?;
23822        Ok(__struct)
23823    }
23824    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23825        let mut __tmp = BytesMut::new(bytes);
23826        #[allow(clippy::absurd_extreme_comparisons)]
23827        #[allow(unused_comparisons)]
23828        if __tmp.remaining() < Self::ENCODED_LEN {
23829            panic!(
23830                "buffer is too small (need {} bytes, but got {})",
23831                Self::ENCODED_LEN,
23832                __tmp.remaining(),
23833            )
23834        }
23835        __tmp.put_u32_le(self.time_boot_ms);
23836        __tmp.put_f32_le(self.x);
23837        __tmp.put_f32_le(self.y);
23838        __tmp.put_f32_le(self.z);
23839        __tmp.put_f32_le(self.vx);
23840        __tmp.put_f32_le(self.vy);
23841        __tmp.put_f32_le(self.vz);
23842        __tmp.put_f32_le(self.afx);
23843        __tmp.put_f32_le(self.afy);
23844        __tmp.put_f32_le(self.afz);
23845        __tmp.put_f32_le(self.yaw);
23846        __tmp.put_f32_le(self.yaw_rate);
23847        __tmp.put_u16_le(self.type_mask.bits());
23848        __tmp.put_u8(self.coordinate_frame as u8);
23849        if matches!(version, MavlinkVersion::V2) {
23850            let len = __tmp.len();
23851            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23852        } else {
23853            __tmp.len()
23854        }
23855    }
23856}
23857#[doc = "id: 125"]
23858#[doc = "Power supply status."]
23859#[derive(Debug, Clone, PartialEq)]
23860#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23861#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23862pub struct POWER_STATUS_DATA {
23863    #[doc = "5V rail voltage."]
23864    pub Vcc: u16,
23865    #[doc = "Servo rail voltage."]
23866    pub Vservo: u16,
23867    #[doc = "Bitmap of power supply status flags."]
23868    pub flags: MavPowerStatus,
23869}
23870impl POWER_STATUS_DATA {
23871    pub const ENCODED_LEN: usize = 6usize;
23872    pub const DEFAULT: Self = Self {
23873        Vcc: 0_u16,
23874        Vservo: 0_u16,
23875        flags: MavPowerStatus::DEFAULT,
23876    };
23877    #[cfg(feature = "arbitrary")]
23878    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23879        use arbitrary::{Arbitrary, Unstructured};
23880        let mut buf = [0u8; 1024];
23881        rng.fill_bytes(&mut buf);
23882        let mut unstructured = Unstructured::new(&buf);
23883        Self::arbitrary(&mut unstructured).unwrap_or_default()
23884    }
23885}
23886impl Default for POWER_STATUS_DATA {
23887    fn default() -> Self {
23888        Self::DEFAULT.clone()
23889    }
23890}
23891impl MessageData for POWER_STATUS_DATA {
23892    type Message = MavMessage;
23893    const ID: u32 = 125u32;
23894    const NAME: &'static str = "POWER_STATUS";
23895    const EXTRA_CRC: u8 = 203u8;
23896    const ENCODED_LEN: usize = 6usize;
23897    fn deser(
23898        _version: MavlinkVersion,
23899        __input: &[u8],
23900    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23901        let avail_len = __input.len();
23902        let mut payload_buf = [0; Self::ENCODED_LEN];
23903        let mut buf = if avail_len < Self::ENCODED_LEN {
23904            payload_buf[0..avail_len].copy_from_slice(__input);
23905            Bytes::new(&payload_buf)
23906        } else {
23907            Bytes::new(__input)
23908        };
23909        let mut __struct = Self::default();
23910        __struct.Vcc = buf.get_u16_le();
23911        __struct.Vservo = buf.get_u16_le();
23912        let tmp = buf.get_u16_le();
23913        __struct.flags = MavPowerStatus::from_bits(tmp & MavPowerStatus::all().bits()).ok_or(
23914            ::mavlink_core::error::ParserError::InvalidFlag {
23915                flag_type: "MavPowerStatus",
23916                value: tmp as u32,
23917            },
23918        )?;
23919        Ok(__struct)
23920    }
23921    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23922        let mut __tmp = BytesMut::new(bytes);
23923        #[allow(clippy::absurd_extreme_comparisons)]
23924        #[allow(unused_comparisons)]
23925        if __tmp.remaining() < Self::ENCODED_LEN {
23926            panic!(
23927                "buffer is too small (need {} bytes, but got {})",
23928                Self::ENCODED_LEN,
23929                __tmp.remaining(),
23930            )
23931        }
23932        __tmp.put_u16_le(self.Vcc);
23933        __tmp.put_u16_le(self.Vservo);
23934        __tmp.put_u16_le(self.flags.bits());
23935        if matches!(version, MavlinkVersion::V2) {
23936            let len = __tmp.len();
23937            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23938        } else {
23939            __tmp.len()
23940        }
23941    }
23942}
23943#[doc = "id: 300"]
23944#[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
23945#[derive(Debug, Clone, PartialEq)]
23946#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23947#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23948pub struct PROTOCOL_VERSION_DATA {
23949    #[doc = "Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc."]
23950    pub version: u16,
23951    #[doc = "Minimum MAVLink version supported"]
23952    pub min_version: u16,
23953    #[doc = "Maximum MAVLink version supported (set to the same value as version by default)"]
23954    pub max_version: u16,
23955    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
23956    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23957    pub spec_version_hash: [u8; 8],
23958    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
23959    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23960    pub library_version_hash: [u8; 8],
23961}
23962impl PROTOCOL_VERSION_DATA {
23963    pub const ENCODED_LEN: usize = 22usize;
23964    pub const DEFAULT: Self = Self {
23965        version: 0_u16,
23966        min_version: 0_u16,
23967        max_version: 0_u16,
23968        spec_version_hash: [0_u8; 8usize],
23969        library_version_hash: [0_u8; 8usize],
23970    };
23971    #[cfg(feature = "arbitrary")]
23972    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23973        use arbitrary::{Arbitrary, Unstructured};
23974        let mut buf = [0u8; 1024];
23975        rng.fill_bytes(&mut buf);
23976        let mut unstructured = Unstructured::new(&buf);
23977        Self::arbitrary(&mut unstructured).unwrap_or_default()
23978    }
23979}
23980impl Default for PROTOCOL_VERSION_DATA {
23981    fn default() -> Self {
23982        Self::DEFAULT.clone()
23983    }
23984}
23985impl MessageData for PROTOCOL_VERSION_DATA {
23986    type Message = MavMessage;
23987    const ID: u32 = 300u32;
23988    const NAME: &'static str = "PROTOCOL_VERSION";
23989    const EXTRA_CRC: u8 = 217u8;
23990    const ENCODED_LEN: usize = 22usize;
23991    fn deser(
23992        _version: MavlinkVersion,
23993        __input: &[u8],
23994    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23995        let avail_len = __input.len();
23996        let mut payload_buf = [0; Self::ENCODED_LEN];
23997        let mut buf = if avail_len < Self::ENCODED_LEN {
23998            payload_buf[0..avail_len].copy_from_slice(__input);
23999            Bytes::new(&payload_buf)
24000        } else {
24001            Bytes::new(__input)
24002        };
24003        let mut __struct = Self::default();
24004        __struct.version = buf.get_u16_le();
24005        __struct.min_version = buf.get_u16_le();
24006        __struct.max_version = buf.get_u16_le();
24007        for v in &mut __struct.spec_version_hash {
24008            let val = buf.get_u8();
24009            *v = val;
24010        }
24011        for v in &mut __struct.library_version_hash {
24012            let val = buf.get_u8();
24013            *v = val;
24014        }
24015        Ok(__struct)
24016    }
24017    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24018        let mut __tmp = BytesMut::new(bytes);
24019        #[allow(clippy::absurd_extreme_comparisons)]
24020        #[allow(unused_comparisons)]
24021        if __tmp.remaining() < Self::ENCODED_LEN {
24022            panic!(
24023                "buffer is too small (need {} bytes, but got {})",
24024                Self::ENCODED_LEN,
24025                __tmp.remaining(),
24026            )
24027        }
24028        __tmp.put_u16_le(self.version);
24029        __tmp.put_u16_le(self.min_version);
24030        __tmp.put_u16_le(self.max_version);
24031        for val in &self.spec_version_hash {
24032            __tmp.put_u8(*val);
24033        }
24034        for val in &self.library_version_hash {
24035            __tmp.put_u8(*val);
24036        }
24037        if matches!(version, MavlinkVersion::V2) {
24038            let len = __tmp.len();
24039            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24040        } else {
24041            __tmp.len()
24042        }
24043    }
24044}
24045#[doc = "id: 221"]
24046#[doc = "Complete set of calibration parameters for the radio."]
24047#[derive(Debug, Clone, PartialEq)]
24048#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24049#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24050pub struct RADIO_CALIBRATION_DATA {
24051    #[doc = "Aileron setpoints: left, center, right"]
24052    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24053    pub aileron: [u16; 3],
24054    #[doc = "Elevator setpoints: nose down, center, nose up"]
24055    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24056    pub elevator: [u16; 3],
24057    #[doc = "Rudder setpoints: nose left, center, nose right"]
24058    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24059    pub rudder: [u16; 3],
24060    #[doc = "Tail gyro mode/gain setpoints: heading hold, rate mode"]
24061    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24062    pub gyro: [u16; 2],
24063    #[doc = "Pitch curve setpoints (every 25%)"]
24064    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24065    pub pitch: [u16; 5],
24066    #[doc = "Throttle curve setpoints (every 25%)"]
24067    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24068    pub throttle: [u16; 5],
24069}
24070impl RADIO_CALIBRATION_DATA {
24071    pub const ENCODED_LEN: usize = 42usize;
24072    pub const DEFAULT: Self = Self {
24073        aileron: [0_u16; 3usize],
24074        elevator: [0_u16; 3usize],
24075        rudder: [0_u16; 3usize],
24076        gyro: [0_u16; 2usize],
24077        pitch: [0_u16; 5usize],
24078        throttle: [0_u16; 5usize],
24079    };
24080    #[cfg(feature = "arbitrary")]
24081    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24082        use arbitrary::{Arbitrary, Unstructured};
24083        let mut buf = [0u8; 1024];
24084        rng.fill_bytes(&mut buf);
24085        let mut unstructured = Unstructured::new(&buf);
24086        Self::arbitrary(&mut unstructured).unwrap_or_default()
24087    }
24088}
24089impl Default for RADIO_CALIBRATION_DATA {
24090    fn default() -> Self {
24091        Self::DEFAULT.clone()
24092    }
24093}
24094impl MessageData for RADIO_CALIBRATION_DATA {
24095    type Message = MavMessage;
24096    const ID: u32 = 221u32;
24097    const NAME: &'static str = "RADIO_CALIBRATION";
24098    const EXTRA_CRC: u8 = 71u8;
24099    const ENCODED_LEN: usize = 42usize;
24100    fn deser(
24101        _version: MavlinkVersion,
24102        __input: &[u8],
24103    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24104        let avail_len = __input.len();
24105        let mut payload_buf = [0; Self::ENCODED_LEN];
24106        let mut buf = if avail_len < Self::ENCODED_LEN {
24107            payload_buf[0..avail_len].copy_from_slice(__input);
24108            Bytes::new(&payload_buf)
24109        } else {
24110            Bytes::new(__input)
24111        };
24112        let mut __struct = Self::default();
24113        for v in &mut __struct.aileron {
24114            let val = buf.get_u16_le();
24115            *v = val;
24116        }
24117        for v in &mut __struct.elevator {
24118            let val = buf.get_u16_le();
24119            *v = val;
24120        }
24121        for v in &mut __struct.rudder {
24122            let val = buf.get_u16_le();
24123            *v = val;
24124        }
24125        for v in &mut __struct.gyro {
24126            let val = buf.get_u16_le();
24127            *v = val;
24128        }
24129        for v in &mut __struct.pitch {
24130            let val = buf.get_u16_le();
24131            *v = val;
24132        }
24133        for v in &mut __struct.throttle {
24134            let val = buf.get_u16_le();
24135            *v = val;
24136        }
24137        Ok(__struct)
24138    }
24139    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24140        let mut __tmp = BytesMut::new(bytes);
24141        #[allow(clippy::absurd_extreme_comparisons)]
24142        #[allow(unused_comparisons)]
24143        if __tmp.remaining() < Self::ENCODED_LEN {
24144            panic!(
24145                "buffer is too small (need {} bytes, but got {})",
24146                Self::ENCODED_LEN,
24147                __tmp.remaining(),
24148            )
24149        }
24150        for val in &self.aileron {
24151            __tmp.put_u16_le(*val);
24152        }
24153        for val in &self.elevator {
24154            __tmp.put_u16_le(*val);
24155        }
24156        for val in &self.rudder {
24157            __tmp.put_u16_le(*val);
24158        }
24159        for val in &self.gyro {
24160            __tmp.put_u16_le(*val);
24161        }
24162        for val in &self.pitch {
24163            __tmp.put_u16_le(*val);
24164        }
24165        for val in &self.throttle {
24166            __tmp.put_u16_le(*val);
24167        }
24168        if matches!(version, MavlinkVersion::V2) {
24169            let len = __tmp.len();
24170            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24171        } else {
24172            __tmp.len()
24173        }
24174    }
24175}
24176#[doc = "id: 109"]
24177#[doc = "Status generated by radio and injected into MAVLink stream."]
24178#[derive(Debug, Clone, PartialEq)]
24179#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24180#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24181pub struct RADIO_STATUS_DATA {
24182    #[doc = "Count of radio packet receive errors (since boot)."]
24183    pub rxerrors: u16,
24184    #[doc = "Count of error corrected radio packets (since boot)."]
24185    pub fixed: u16,
24186    #[doc = "Local (message sender) received signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
24187    pub rssi: u8,
24188    #[doc = "Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
24189    pub remrssi: u8,
24190    #[doc = "Remaining free transmitter buffer space."]
24191    pub txbuf: u8,
24192    #[doc = "Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
24193    pub noise: u8,
24194    #[doc = "Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
24195    pub remnoise: u8,
24196}
24197impl RADIO_STATUS_DATA {
24198    pub const ENCODED_LEN: usize = 9usize;
24199    pub const DEFAULT: Self = Self {
24200        rxerrors: 0_u16,
24201        fixed: 0_u16,
24202        rssi: 0_u8,
24203        remrssi: 0_u8,
24204        txbuf: 0_u8,
24205        noise: 0_u8,
24206        remnoise: 0_u8,
24207    };
24208    #[cfg(feature = "arbitrary")]
24209    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24210        use arbitrary::{Arbitrary, Unstructured};
24211        let mut buf = [0u8; 1024];
24212        rng.fill_bytes(&mut buf);
24213        let mut unstructured = Unstructured::new(&buf);
24214        Self::arbitrary(&mut unstructured).unwrap_or_default()
24215    }
24216}
24217impl Default for RADIO_STATUS_DATA {
24218    fn default() -> Self {
24219        Self::DEFAULT.clone()
24220    }
24221}
24222impl MessageData for RADIO_STATUS_DATA {
24223    type Message = MavMessage;
24224    const ID: u32 = 109u32;
24225    const NAME: &'static str = "RADIO_STATUS";
24226    const EXTRA_CRC: u8 = 185u8;
24227    const ENCODED_LEN: usize = 9usize;
24228    fn deser(
24229        _version: MavlinkVersion,
24230        __input: &[u8],
24231    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24232        let avail_len = __input.len();
24233        let mut payload_buf = [0; Self::ENCODED_LEN];
24234        let mut buf = if avail_len < Self::ENCODED_LEN {
24235            payload_buf[0..avail_len].copy_from_slice(__input);
24236            Bytes::new(&payload_buf)
24237        } else {
24238            Bytes::new(__input)
24239        };
24240        let mut __struct = Self::default();
24241        __struct.rxerrors = buf.get_u16_le();
24242        __struct.fixed = buf.get_u16_le();
24243        __struct.rssi = buf.get_u8();
24244        __struct.remrssi = buf.get_u8();
24245        __struct.txbuf = buf.get_u8();
24246        __struct.noise = buf.get_u8();
24247        __struct.remnoise = buf.get_u8();
24248        Ok(__struct)
24249    }
24250    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24251        let mut __tmp = BytesMut::new(bytes);
24252        #[allow(clippy::absurd_extreme_comparisons)]
24253        #[allow(unused_comparisons)]
24254        if __tmp.remaining() < Self::ENCODED_LEN {
24255            panic!(
24256                "buffer is too small (need {} bytes, but got {})",
24257                Self::ENCODED_LEN,
24258                __tmp.remaining(),
24259            )
24260        }
24261        __tmp.put_u16_le(self.rxerrors);
24262        __tmp.put_u16_le(self.fixed);
24263        __tmp.put_u8(self.rssi);
24264        __tmp.put_u8(self.remrssi);
24265        __tmp.put_u8(self.txbuf);
24266        __tmp.put_u8(self.noise);
24267        __tmp.put_u8(self.remnoise);
24268        if matches!(version, MavlinkVersion::V2) {
24269            let len = __tmp.len();
24270            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24271        } else {
24272            __tmp.len()
24273        }
24274    }
24275}
24276#[doc = "id: 27"]
24277#[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
24278#[derive(Debug, Clone, PartialEq)]
24279#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24280#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24281pub struct RAW_IMU_DATA {
24282    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24283    pub time_usec: u64,
24284    #[doc = "X acceleration (raw)"]
24285    pub xacc: i16,
24286    #[doc = "Y acceleration (raw)"]
24287    pub yacc: i16,
24288    #[doc = "Z acceleration (raw)"]
24289    pub zacc: i16,
24290    #[doc = "Angular speed around X axis (raw)"]
24291    pub xgyro: i16,
24292    #[doc = "Angular speed around Y axis (raw)"]
24293    pub ygyro: i16,
24294    #[doc = "Angular speed around Z axis (raw)"]
24295    pub zgyro: i16,
24296    #[doc = "X Magnetic field (raw)"]
24297    pub xmag: i16,
24298    #[doc = "Y Magnetic field (raw)"]
24299    pub ymag: i16,
24300    #[doc = "Z Magnetic field (raw)"]
24301    pub zmag: i16,
24302    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
24303    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24304    pub id: u8,
24305    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
24306    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24307    pub temperature: i16,
24308}
24309impl RAW_IMU_DATA {
24310    pub const ENCODED_LEN: usize = 29usize;
24311    pub const DEFAULT: Self = Self {
24312        time_usec: 0_u64,
24313        xacc: 0_i16,
24314        yacc: 0_i16,
24315        zacc: 0_i16,
24316        xgyro: 0_i16,
24317        ygyro: 0_i16,
24318        zgyro: 0_i16,
24319        xmag: 0_i16,
24320        ymag: 0_i16,
24321        zmag: 0_i16,
24322        id: 0_u8,
24323        temperature: 0_i16,
24324    };
24325    #[cfg(feature = "arbitrary")]
24326    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24327        use arbitrary::{Arbitrary, Unstructured};
24328        let mut buf = [0u8; 1024];
24329        rng.fill_bytes(&mut buf);
24330        let mut unstructured = Unstructured::new(&buf);
24331        Self::arbitrary(&mut unstructured).unwrap_or_default()
24332    }
24333}
24334impl Default for RAW_IMU_DATA {
24335    fn default() -> Self {
24336        Self::DEFAULT.clone()
24337    }
24338}
24339impl MessageData for RAW_IMU_DATA {
24340    type Message = MavMessage;
24341    const ID: u32 = 27u32;
24342    const NAME: &'static str = "RAW_IMU";
24343    const EXTRA_CRC: u8 = 144u8;
24344    const ENCODED_LEN: usize = 29usize;
24345    fn deser(
24346        _version: MavlinkVersion,
24347        __input: &[u8],
24348    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24349        let avail_len = __input.len();
24350        let mut payload_buf = [0; Self::ENCODED_LEN];
24351        let mut buf = if avail_len < Self::ENCODED_LEN {
24352            payload_buf[0..avail_len].copy_from_slice(__input);
24353            Bytes::new(&payload_buf)
24354        } else {
24355            Bytes::new(__input)
24356        };
24357        let mut __struct = Self::default();
24358        __struct.time_usec = buf.get_u64_le();
24359        __struct.xacc = buf.get_i16_le();
24360        __struct.yacc = buf.get_i16_le();
24361        __struct.zacc = buf.get_i16_le();
24362        __struct.xgyro = buf.get_i16_le();
24363        __struct.ygyro = buf.get_i16_le();
24364        __struct.zgyro = buf.get_i16_le();
24365        __struct.xmag = buf.get_i16_le();
24366        __struct.ymag = buf.get_i16_le();
24367        __struct.zmag = buf.get_i16_le();
24368        __struct.id = buf.get_u8();
24369        __struct.temperature = buf.get_i16_le();
24370        Ok(__struct)
24371    }
24372    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24373        let mut __tmp = BytesMut::new(bytes);
24374        #[allow(clippy::absurd_extreme_comparisons)]
24375        #[allow(unused_comparisons)]
24376        if __tmp.remaining() < Self::ENCODED_LEN {
24377            panic!(
24378                "buffer is too small (need {} bytes, but got {})",
24379                Self::ENCODED_LEN,
24380                __tmp.remaining(),
24381            )
24382        }
24383        __tmp.put_u64_le(self.time_usec);
24384        __tmp.put_i16_le(self.xacc);
24385        __tmp.put_i16_le(self.yacc);
24386        __tmp.put_i16_le(self.zacc);
24387        __tmp.put_i16_le(self.xgyro);
24388        __tmp.put_i16_le(self.ygyro);
24389        __tmp.put_i16_le(self.zgyro);
24390        __tmp.put_i16_le(self.xmag);
24391        __tmp.put_i16_le(self.ymag);
24392        __tmp.put_i16_le(self.zmag);
24393        __tmp.put_u8(self.id);
24394        __tmp.put_i16_le(self.temperature);
24395        if matches!(version, MavlinkVersion::V2) {
24396            let len = __tmp.len();
24397            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24398        } else {
24399            __tmp.len()
24400        }
24401    }
24402}
24403#[doc = "id: 28"]
24404#[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
24405#[derive(Debug, Clone, PartialEq)]
24406#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24407#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24408pub struct RAW_PRESSURE_DATA {
24409    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24410    pub time_usec: u64,
24411    #[doc = "Absolute pressure (raw)"]
24412    pub press_abs: i16,
24413    #[doc = "Differential pressure 1 (raw, 0 if nonexistent)"]
24414    pub press_diff1: i16,
24415    #[doc = "Differential pressure 2 (raw, 0 if nonexistent)"]
24416    pub press_diff2: i16,
24417    #[doc = "Raw Temperature measurement (raw)"]
24418    pub temperature: i16,
24419}
24420impl RAW_PRESSURE_DATA {
24421    pub const ENCODED_LEN: usize = 16usize;
24422    pub const DEFAULT: Self = Self {
24423        time_usec: 0_u64,
24424        press_abs: 0_i16,
24425        press_diff1: 0_i16,
24426        press_diff2: 0_i16,
24427        temperature: 0_i16,
24428    };
24429    #[cfg(feature = "arbitrary")]
24430    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24431        use arbitrary::{Arbitrary, Unstructured};
24432        let mut buf = [0u8; 1024];
24433        rng.fill_bytes(&mut buf);
24434        let mut unstructured = Unstructured::new(&buf);
24435        Self::arbitrary(&mut unstructured).unwrap_or_default()
24436    }
24437}
24438impl Default for RAW_PRESSURE_DATA {
24439    fn default() -> Self {
24440        Self::DEFAULT.clone()
24441    }
24442}
24443impl MessageData for RAW_PRESSURE_DATA {
24444    type Message = MavMessage;
24445    const ID: u32 = 28u32;
24446    const NAME: &'static str = "RAW_PRESSURE";
24447    const EXTRA_CRC: u8 = 67u8;
24448    const ENCODED_LEN: usize = 16usize;
24449    fn deser(
24450        _version: MavlinkVersion,
24451        __input: &[u8],
24452    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24453        let avail_len = __input.len();
24454        let mut payload_buf = [0; Self::ENCODED_LEN];
24455        let mut buf = if avail_len < Self::ENCODED_LEN {
24456            payload_buf[0..avail_len].copy_from_slice(__input);
24457            Bytes::new(&payload_buf)
24458        } else {
24459            Bytes::new(__input)
24460        };
24461        let mut __struct = Self::default();
24462        __struct.time_usec = buf.get_u64_le();
24463        __struct.press_abs = buf.get_i16_le();
24464        __struct.press_diff1 = buf.get_i16_le();
24465        __struct.press_diff2 = buf.get_i16_le();
24466        __struct.temperature = buf.get_i16_le();
24467        Ok(__struct)
24468    }
24469    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24470        let mut __tmp = BytesMut::new(bytes);
24471        #[allow(clippy::absurd_extreme_comparisons)]
24472        #[allow(unused_comparisons)]
24473        if __tmp.remaining() < Self::ENCODED_LEN {
24474            panic!(
24475                "buffer is too small (need {} bytes, but got {})",
24476                Self::ENCODED_LEN,
24477                __tmp.remaining(),
24478            )
24479        }
24480        __tmp.put_u64_le(self.time_usec);
24481        __tmp.put_i16_le(self.press_abs);
24482        __tmp.put_i16_le(self.press_diff1);
24483        __tmp.put_i16_le(self.press_diff2);
24484        __tmp.put_i16_le(self.temperature);
24485        if matches!(version, MavlinkVersion::V2) {
24486            let len = __tmp.len();
24487            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24488        } else {
24489            __tmp.len()
24490        }
24491    }
24492}
24493#[doc = "id: 339"]
24494#[doc = "RPM sensor data message."]
24495#[derive(Debug, Clone, PartialEq)]
24496#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24497#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24498pub struct RAW_RPM_DATA {
24499    #[doc = "Indicated rate"]
24500    pub frequency: f32,
24501    #[doc = "Index of this RPM sensor (0-indexed)"]
24502    pub index: u8,
24503}
24504impl RAW_RPM_DATA {
24505    pub const ENCODED_LEN: usize = 5usize;
24506    pub const DEFAULT: Self = Self {
24507        frequency: 0.0_f32,
24508        index: 0_u8,
24509    };
24510    #[cfg(feature = "arbitrary")]
24511    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24512        use arbitrary::{Arbitrary, Unstructured};
24513        let mut buf = [0u8; 1024];
24514        rng.fill_bytes(&mut buf);
24515        let mut unstructured = Unstructured::new(&buf);
24516        Self::arbitrary(&mut unstructured).unwrap_or_default()
24517    }
24518}
24519impl Default for RAW_RPM_DATA {
24520    fn default() -> Self {
24521        Self::DEFAULT.clone()
24522    }
24523}
24524impl MessageData for RAW_RPM_DATA {
24525    type Message = MavMessage;
24526    const ID: u32 = 339u32;
24527    const NAME: &'static str = "RAW_RPM";
24528    const EXTRA_CRC: u8 = 199u8;
24529    const ENCODED_LEN: usize = 5usize;
24530    fn deser(
24531        _version: MavlinkVersion,
24532        __input: &[u8],
24533    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24534        let avail_len = __input.len();
24535        let mut payload_buf = [0; Self::ENCODED_LEN];
24536        let mut buf = if avail_len < Self::ENCODED_LEN {
24537            payload_buf[0..avail_len].copy_from_slice(__input);
24538            Bytes::new(&payload_buf)
24539        } else {
24540            Bytes::new(__input)
24541        };
24542        let mut __struct = Self::default();
24543        __struct.frequency = buf.get_f32_le();
24544        __struct.index = buf.get_u8();
24545        Ok(__struct)
24546    }
24547    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24548        let mut __tmp = BytesMut::new(bytes);
24549        #[allow(clippy::absurd_extreme_comparisons)]
24550        #[allow(unused_comparisons)]
24551        if __tmp.remaining() < Self::ENCODED_LEN {
24552            panic!(
24553                "buffer is too small (need {} bytes, but got {})",
24554                Self::ENCODED_LEN,
24555                __tmp.remaining(),
24556            )
24557        }
24558        __tmp.put_f32_le(self.frequency);
24559        __tmp.put_u8(self.index);
24560        if matches!(version, MavlinkVersion::V2) {
24561            let len = __tmp.len();
24562            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24563        } else {
24564            __tmp.len()
24565        }
24566    }
24567}
24568#[doc = "id: 65"]
24569#[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
24570#[derive(Debug, Clone, PartialEq)]
24571#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24572#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24573pub struct RC_CHANNELS_DATA {
24574    #[doc = "Timestamp (time since system boot)."]
24575    pub time_boot_ms: u32,
24576    #[doc = "RC channel 1 value."]
24577    pub chan1_raw: u16,
24578    #[doc = "RC channel 2 value."]
24579    pub chan2_raw: u16,
24580    #[doc = "RC channel 3 value."]
24581    pub chan3_raw: u16,
24582    #[doc = "RC channel 4 value."]
24583    pub chan4_raw: u16,
24584    #[doc = "RC channel 5 value."]
24585    pub chan5_raw: u16,
24586    #[doc = "RC channel 6 value."]
24587    pub chan6_raw: u16,
24588    #[doc = "RC channel 7 value."]
24589    pub chan7_raw: u16,
24590    #[doc = "RC channel 8 value."]
24591    pub chan8_raw: u16,
24592    #[doc = "RC channel 9 value."]
24593    pub chan9_raw: u16,
24594    #[doc = "RC channel 10 value."]
24595    pub chan10_raw: u16,
24596    #[doc = "RC channel 11 value."]
24597    pub chan11_raw: u16,
24598    #[doc = "RC channel 12 value."]
24599    pub chan12_raw: u16,
24600    #[doc = "RC channel 13 value."]
24601    pub chan13_raw: u16,
24602    #[doc = "RC channel 14 value."]
24603    pub chan14_raw: u16,
24604    #[doc = "RC channel 15 value."]
24605    pub chan15_raw: u16,
24606    #[doc = "RC channel 16 value."]
24607    pub chan16_raw: u16,
24608    #[doc = "RC channel 17 value."]
24609    pub chan17_raw: u16,
24610    #[doc = "RC channel 18 value."]
24611    pub chan18_raw: u16,
24612    #[doc = "Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available."]
24613    pub chancount: u8,
24614    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
24615    pub rssi: u8,
24616}
24617impl RC_CHANNELS_DATA {
24618    pub const ENCODED_LEN: usize = 42usize;
24619    pub const DEFAULT: Self = Self {
24620        time_boot_ms: 0_u32,
24621        chan1_raw: 0_u16,
24622        chan2_raw: 0_u16,
24623        chan3_raw: 0_u16,
24624        chan4_raw: 0_u16,
24625        chan5_raw: 0_u16,
24626        chan6_raw: 0_u16,
24627        chan7_raw: 0_u16,
24628        chan8_raw: 0_u16,
24629        chan9_raw: 0_u16,
24630        chan10_raw: 0_u16,
24631        chan11_raw: 0_u16,
24632        chan12_raw: 0_u16,
24633        chan13_raw: 0_u16,
24634        chan14_raw: 0_u16,
24635        chan15_raw: 0_u16,
24636        chan16_raw: 0_u16,
24637        chan17_raw: 0_u16,
24638        chan18_raw: 0_u16,
24639        chancount: 0_u8,
24640        rssi: 0_u8,
24641    };
24642    #[cfg(feature = "arbitrary")]
24643    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24644        use arbitrary::{Arbitrary, Unstructured};
24645        let mut buf = [0u8; 1024];
24646        rng.fill_bytes(&mut buf);
24647        let mut unstructured = Unstructured::new(&buf);
24648        Self::arbitrary(&mut unstructured).unwrap_or_default()
24649    }
24650}
24651impl Default for RC_CHANNELS_DATA {
24652    fn default() -> Self {
24653        Self::DEFAULT.clone()
24654    }
24655}
24656impl MessageData for RC_CHANNELS_DATA {
24657    type Message = MavMessage;
24658    const ID: u32 = 65u32;
24659    const NAME: &'static str = "RC_CHANNELS";
24660    const EXTRA_CRC: u8 = 118u8;
24661    const ENCODED_LEN: usize = 42usize;
24662    fn deser(
24663        _version: MavlinkVersion,
24664        __input: &[u8],
24665    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24666        let avail_len = __input.len();
24667        let mut payload_buf = [0; Self::ENCODED_LEN];
24668        let mut buf = if avail_len < Self::ENCODED_LEN {
24669            payload_buf[0..avail_len].copy_from_slice(__input);
24670            Bytes::new(&payload_buf)
24671        } else {
24672            Bytes::new(__input)
24673        };
24674        let mut __struct = Self::default();
24675        __struct.time_boot_ms = buf.get_u32_le();
24676        __struct.chan1_raw = buf.get_u16_le();
24677        __struct.chan2_raw = buf.get_u16_le();
24678        __struct.chan3_raw = buf.get_u16_le();
24679        __struct.chan4_raw = buf.get_u16_le();
24680        __struct.chan5_raw = buf.get_u16_le();
24681        __struct.chan6_raw = buf.get_u16_le();
24682        __struct.chan7_raw = buf.get_u16_le();
24683        __struct.chan8_raw = buf.get_u16_le();
24684        __struct.chan9_raw = buf.get_u16_le();
24685        __struct.chan10_raw = buf.get_u16_le();
24686        __struct.chan11_raw = buf.get_u16_le();
24687        __struct.chan12_raw = buf.get_u16_le();
24688        __struct.chan13_raw = buf.get_u16_le();
24689        __struct.chan14_raw = buf.get_u16_le();
24690        __struct.chan15_raw = buf.get_u16_le();
24691        __struct.chan16_raw = buf.get_u16_le();
24692        __struct.chan17_raw = buf.get_u16_le();
24693        __struct.chan18_raw = buf.get_u16_le();
24694        __struct.chancount = buf.get_u8();
24695        __struct.rssi = buf.get_u8();
24696        Ok(__struct)
24697    }
24698    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24699        let mut __tmp = BytesMut::new(bytes);
24700        #[allow(clippy::absurd_extreme_comparisons)]
24701        #[allow(unused_comparisons)]
24702        if __tmp.remaining() < Self::ENCODED_LEN {
24703            panic!(
24704                "buffer is too small (need {} bytes, but got {})",
24705                Self::ENCODED_LEN,
24706                __tmp.remaining(),
24707            )
24708        }
24709        __tmp.put_u32_le(self.time_boot_ms);
24710        __tmp.put_u16_le(self.chan1_raw);
24711        __tmp.put_u16_le(self.chan2_raw);
24712        __tmp.put_u16_le(self.chan3_raw);
24713        __tmp.put_u16_le(self.chan4_raw);
24714        __tmp.put_u16_le(self.chan5_raw);
24715        __tmp.put_u16_le(self.chan6_raw);
24716        __tmp.put_u16_le(self.chan7_raw);
24717        __tmp.put_u16_le(self.chan8_raw);
24718        __tmp.put_u16_le(self.chan9_raw);
24719        __tmp.put_u16_le(self.chan10_raw);
24720        __tmp.put_u16_le(self.chan11_raw);
24721        __tmp.put_u16_le(self.chan12_raw);
24722        __tmp.put_u16_le(self.chan13_raw);
24723        __tmp.put_u16_le(self.chan14_raw);
24724        __tmp.put_u16_le(self.chan15_raw);
24725        __tmp.put_u16_le(self.chan16_raw);
24726        __tmp.put_u16_le(self.chan17_raw);
24727        __tmp.put_u16_le(self.chan18_raw);
24728        __tmp.put_u8(self.chancount);
24729        __tmp.put_u8(self.rssi);
24730        if matches!(version, MavlinkVersion::V2) {
24731            let len = __tmp.len();
24732            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24733        } else {
24734            __tmp.len()
24735        }
24736    }
24737}
24738#[doc = "id: 70"]
24739#[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
24740#[derive(Debug, Clone, PartialEq)]
24741#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24742#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24743pub struct RC_CHANNELS_OVERRIDE_DATA {
24744    #[doc = "RC channel 1 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
24745    pub chan1_raw: u16,
24746    #[doc = "RC channel 2 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
24747    pub chan2_raw: u16,
24748    #[doc = "RC channel 3 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
24749    pub chan3_raw: u16,
24750    #[doc = "RC channel 4 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
24751    pub chan4_raw: u16,
24752    #[doc = "RC channel 5 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
24753    pub chan5_raw: u16,
24754    #[doc = "RC channel 6 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
24755    pub chan6_raw: u16,
24756    #[doc = "RC channel 7 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
24757    pub chan7_raw: u16,
24758    #[doc = "RC channel 8 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
24759    pub chan8_raw: u16,
24760    #[doc = "System ID"]
24761    pub target_system: u8,
24762    #[doc = "Component ID"]
24763    pub target_component: u8,
24764    #[doc = "RC channel 9 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
24765    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24766    pub chan9_raw: u16,
24767    #[doc = "RC channel 10 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
24768    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24769    pub chan10_raw: u16,
24770    #[doc = "RC channel 11 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
24771    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24772    pub chan11_raw: u16,
24773    #[doc = "RC channel 12 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
24774    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24775    pub chan12_raw: u16,
24776    #[doc = "RC channel 13 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
24777    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24778    pub chan13_raw: u16,
24779    #[doc = "RC channel 14 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
24780    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24781    pub chan14_raw: u16,
24782    #[doc = "RC channel 15 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
24783    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24784    pub chan15_raw: u16,
24785    #[doc = "RC channel 16 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
24786    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24787    pub chan16_raw: u16,
24788    #[doc = "RC channel 17 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
24789    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24790    pub chan17_raw: u16,
24791    #[doc = "RC channel 18 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
24792    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24793    pub chan18_raw: u16,
24794}
24795impl RC_CHANNELS_OVERRIDE_DATA {
24796    pub const ENCODED_LEN: usize = 38usize;
24797    pub const DEFAULT: Self = Self {
24798        chan1_raw: 0_u16,
24799        chan2_raw: 0_u16,
24800        chan3_raw: 0_u16,
24801        chan4_raw: 0_u16,
24802        chan5_raw: 0_u16,
24803        chan6_raw: 0_u16,
24804        chan7_raw: 0_u16,
24805        chan8_raw: 0_u16,
24806        target_system: 0_u8,
24807        target_component: 0_u8,
24808        chan9_raw: 0_u16,
24809        chan10_raw: 0_u16,
24810        chan11_raw: 0_u16,
24811        chan12_raw: 0_u16,
24812        chan13_raw: 0_u16,
24813        chan14_raw: 0_u16,
24814        chan15_raw: 0_u16,
24815        chan16_raw: 0_u16,
24816        chan17_raw: 0_u16,
24817        chan18_raw: 0_u16,
24818    };
24819    #[cfg(feature = "arbitrary")]
24820    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24821        use arbitrary::{Arbitrary, Unstructured};
24822        let mut buf = [0u8; 1024];
24823        rng.fill_bytes(&mut buf);
24824        let mut unstructured = Unstructured::new(&buf);
24825        Self::arbitrary(&mut unstructured).unwrap_or_default()
24826    }
24827}
24828impl Default for RC_CHANNELS_OVERRIDE_DATA {
24829    fn default() -> Self {
24830        Self::DEFAULT.clone()
24831    }
24832}
24833impl MessageData for RC_CHANNELS_OVERRIDE_DATA {
24834    type Message = MavMessage;
24835    const ID: u32 = 70u32;
24836    const NAME: &'static str = "RC_CHANNELS_OVERRIDE";
24837    const EXTRA_CRC: u8 = 124u8;
24838    const ENCODED_LEN: usize = 38usize;
24839    fn deser(
24840        _version: MavlinkVersion,
24841        __input: &[u8],
24842    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24843        let avail_len = __input.len();
24844        let mut payload_buf = [0; Self::ENCODED_LEN];
24845        let mut buf = if avail_len < Self::ENCODED_LEN {
24846            payload_buf[0..avail_len].copy_from_slice(__input);
24847            Bytes::new(&payload_buf)
24848        } else {
24849            Bytes::new(__input)
24850        };
24851        let mut __struct = Self::default();
24852        __struct.chan1_raw = buf.get_u16_le();
24853        __struct.chan2_raw = buf.get_u16_le();
24854        __struct.chan3_raw = buf.get_u16_le();
24855        __struct.chan4_raw = buf.get_u16_le();
24856        __struct.chan5_raw = buf.get_u16_le();
24857        __struct.chan6_raw = buf.get_u16_le();
24858        __struct.chan7_raw = buf.get_u16_le();
24859        __struct.chan8_raw = buf.get_u16_le();
24860        __struct.target_system = buf.get_u8();
24861        __struct.target_component = buf.get_u8();
24862        __struct.chan9_raw = buf.get_u16_le();
24863        __struct.chan10_raw = buf.get_u16_le();
24864        __struct.chan11_raw = buf.get_u16_le();
24865        __struct.chan12_raw = buf.get_u16_le();
24866        __struct.chan13_raw = buf.get_u16_le();
24867        __struct.chan14_raw = buf.get_u16_le();
24868        __struct.chan15_raw = buf.get_u16_le();
24869        __struct.chan16_raw = buf.get_u16_le();
24870        __struct.chan17_raw = buf.get_u16_le();
24871        __struct.chan18_raw = buf.get_u16_le();
24872        Ok(__struct)
24873    }
24874    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24875        let mut __tmp = BytesMut::new(bytes);
24876        #[allow(clippy::absurd_extreme_comparisons)]
24877        #[allow(unused_comparisons)]
24878        if __tmp.remaining() < Self::ENCODED_LEN {
24879            panic!(
24880                "buffer is too small (need {} bytes, but got {})",
24881                Self::ENCODED_LEN,
24882                __tmp.remaining(),
24883            )
24884        }
24885        __tmp.put_u16_le(self.chan1_raw);
24886        __tmp.put_u16_le(self.chan2_raw);
24887        __tmp.put_u16_le(self.chan3_raw);
24888        __tmp.put_u16_le(self.chan4_raw);
24889        __tmp.put_u16_le(self.chan5_raw);
24890        __tmp.put_u16_le(self.chan6_raw);
24891        __tmp.put_u16_le(self.chan7_raw);
24892        __tmp.put_u16_le(self.chan8_raw);
24893        __tmp.put_u8(self.target_system);
24894        __tmp.put_u8(self.target_component);
24895        __tmp.put_u16_le(self.chan9_raw);
24896        __tmp.put_u16_le(self.chan10_raw);
24897        __tmp.put_u16_le(self.chan11_raw);
24898        __tmp.put_u16_le(self.chan12_raw);
24899        __tmp.put_u16_le(self.chan13_raw);
24900        __tmp.put_u16_le(self.chan14_raw);
24901        __tmp.put_u16_le(self.chan15_raw);
24902        __tmp.put_u16_le(self.chan16_raw);
24903        __tmp.put_u16_le(self.chan17_raw);
24904        __tmp.put_u16_le(self.chan18_raw);
24905        if matches!(version, MavlinkVersion::V2) {
24906            let len = __tmp.len();
24907            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24908        } else {
24909            __tmp.len()
24910        }
24911    }
24912}
24913#[doc = "id: 35"]
24914#[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
24915#[derive(Debug, Clone, PartialEq)]
24916#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24917#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24918pub struct RC_CHANNELS_RAW_DATA {
24919    #[doc = "Timestamp (time since system boot)."]
24920    pub time_boot_ms: u32,
24921    #[doc = "RC channel 1 value."]
24922    pub chan1_raw: u16,
24923    #[doc = "RC channel 2 value."]
24924    pub chan2_raw: u16,
24925    #[doc = "RC channel 3 value."]
24926    pub chan3_raw: u16,
24927    #[doc = "RC channel 4 value."]
24928    pub chan4_raw: u16,
24929    #[doc = "RC channel 5 value."]
24930    pub chan5_raw: u16,
24931    #[doc = "RC channel 6 value."]
24932    pub chan6_raw: u16,
24933    #[doc = "RC channel 7 value."]
24934    pub chan7_raw: u16,
24935    #[doc = "RC channel 8 value."]
24936    pub chan8_raw: u16,
24937    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
24938    pub port: u8,
24939    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
24940    pub rssi: u8,
24941}
24942impl RC_CHANNELS_RAW_DATA {
24943    pub const ENCODED_LEN: usize = 22usize;
24944    pub const DEFAULT: Self = Self {
24945        time_boot_ms: 0_u32,
24946        chan1_raw: 0_u16,
24947        chan2_raw: 0_u16,
24948        chan3_raw: 0_u16,
24949        chan4_raw: 0_u16,
24950        chan5_raw: 0_u16,
24951        chan6_raw: 0_u16,
24952        chan7_raw: 0_u16,
24953        chan8_raw: 0_u16,
24954        port: 0_u8,
24955        rssi: 0_u8,
24956    };
24957    #[cfg(feature = "arbitrary")]
24958    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24959        use arbitrary::{Arbitrary, Unstructured};
24960        let mut buf = [0u8; 1024];
24961        rng.fill_bytes(&mut buf);
24962        let mut unstructured = Unstructured::new(&buf);
24963        Self::arbitrary(&mut unstructured).unwrap_or_default()
24964    }
24965}
24966impl Default for RC_CHANNELS_RAW_DATA {
24967    fn default() -> Self {
24968        Self::DEFAULT.clone()
24969    }
24970}
24971impl MessageData for RC_CHANNELS_RAW_DATA {
24972    type Message = MavMessage;
24973    const ID: u32 = 35u32;
24974    const NAME: &'static str = "RC_CHANNELS_RAW";
24975    const EXTRA_CRC: u8 = 244u8;
24976    const ENCODED_LEN: usize = 22usize;
24977    fn deser(
24978        _version: MavlinkVersion,
24979        __input: &[u8],
24980    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24981        let avail_len = __input.len();
24982        let mut payload_buf = [0; Self::ENCODED_LEN];
24983        let mut buf = if avail_len < Self::ENCODED_LEN {
24984            payload_buf[0..avail_len].copy_from_slice(__input);
24985            Bytes::new(&payload_buf)
24986        } else {
24987            Bytes::new(__input)
24988        };
24989        let mut __struct = Self::default();
24990        __struct.time_boot_ms = buf.get_u32_le();
24991        __struct.chan1_raw = buf.get_u16_le();
24992        __struct.chan2_raw = buf.get_u16_le();
24993        __struct.chan3_raw = buf.get_u16_le();
24994        __struct.chan4_raw = buf.get_u16_le();
24995        __struct.chan5_raw = buf.get_u16_le();
24996        __struct.chan6_raw = buf.get_u16_le();
24997        __struct.chan7_raw = buf.get_u16_le();
24998        __struct.chan8_raw = buf.get_u16_le();
24999        __struct.port = buf.get_u8();
25000        __struct.rssi = buf.get_u8();
25001        Ok(__struct)
25002    }
25003    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25004        let mut __tmp = BytesMut::new(bytes);
25005        #[allow(clippy::absurd_extreme_comparisons)]
25006        #[allow(unused_comparisons)]
25007        if __tmp.remaining() < Self::ENCODED_LEN {
25008            panic!(
25009                "buffer is too small (need {} bytes, but got {})",
25010                Self::ENCODED_LEN,
25011                __tmp.remaining(),
25012            )
25013        }
25014        __tmp.put_u32_le(self.time_boot_ms);
25015        __tmp.put_u16_le(self.chan1_raw);
25016        __tmp.put_u16_le(self.chan2_raw);
25017        __tmp.put_u16_le(self.chan3_raw);
25018        __tmp.put_u16_le(self.chan4_raw);
25019        __tmp.put_u16_le(self.chan5_raw);
25020        __tmp.put_u16_le(self.chan6_raw);
25021        __tmp.put_u16_le(self.chan7_raw);
25022        __tmp.put_u16_le(self.chan8_raw);
25023        __tmp.put_u8(self.port);
25024        __tmp.put_u8(self.rssi);
25025        if matches!(version, MavlinkVersion::V2) {
25026            let len = __tmp.len();
25027            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25028        } else {
25029            __tmp.len()
25030        }
25031    }
25032}
25033#[doc = "id: 34"]
25034#[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
25035#[derive(Debug, Clone, PartialEq)]
25036#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25037#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25038pub struct RC_CHANNELS_SCALED_DATA {
25039    #[doc = "Timestamp (time since system boot)."]
25040    pub time_boot_ms: u32,
25041    #[doc = "RC channel 1 value scaled."]
25042    pub chan1_scaled: i16,
25043    #[doc = "RC channel 2 value scaled."]
25044    pub chan2_scaled: i16,
25045    #[doc = "RC channel 3 value scaled."]
25046    pub chan3_scaled: i16,
25047    #[doc = "RC channel 4 value scaled."]
25048    pub chan4_scaled: i16,
25049    #[doc = "RC channel 5 value scaled."]
25050    pub chan5_scaled: i16,
25051    #[doc = "RC channel 6 value scaled."]
25052    pub chan6_scaled: i16,
25053    #[doc = "RC channel 7 value scaled."]
25054    pub chan7_scaled: i16,
25055    #[doc = "RC channel 8 value scaled."]
25056    pub chan8_scaled: i16,
25057    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
25058    pub port: u8,
25059    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25060    pub rssi: u8,
25061}
25062impl RC_CHANNELS_SCALED_DATA {
25063    pub const ENCODED_LEN: usize = 22usize;
25064    pub const DEFAULT: Self = Self {
25065        time_boot_ms: 0_u32,
25066        chan1_scaled: 0_i16,
25067        chan2_scaled: 0_i16,
25068        chan3_scaled: 0_i16,
25069        chan4_scaled: 0_i16,
25070        chan5_scaled: 0_i16,
25071        chan6_scaled: 0_i16,
25072        chan7_scaled: 0_i16,
25073        chan8_scaled: 0_i16,
25074        port: 0_u8,
25075        rssi: 0_u8,
25076    };
25077    #[cfg(feature = "arbitrary")]
25078    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25079        use arbitrary::{Arbitrary, Unstructured};
25080        let mut buf = [0u8; 1024];
25081        rng.fill_bytes(&mut buf);
25082        let mut unstructured = Unstructured::new(&buf);
25083        Self::arbitrary(&mut unstructured).unwrap_or_default()
25084    }
25085}
25086impl Default for RC_CHANNELS_SCALED_DATA {
25087    fn default() -> Self {
25088        Self::DEFAULT.clone()
25089    }
25090}
25091impl MessageData for RC_CHANNELS_SCALED_DATA {
25092    type Message = MavMessage;
25093    const ID: u32 = 34u32;
25094    const NAME: &'static str = "RC_CHANNELS_SCALED";
25095    const EXTRA_CRC: u8 = 237u8;
25096    const ENCODED_LEN: usize = 22usize;
25097    fn deser(
25098        _version: MavlinkVersion,
25099        __input: &[u8],
25100    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25101        let avail_len = __input.len();
25102        let mut payload_buf = [0; Self::ENCODED_LEN];
25103        let mut buf = if avail_len < Self::ENCODED_LEN {
25104            payload_buf[0..avail_len].copy_from_slice(__input);
25105            Bytes::new(&payload_buf)
25106        } else {
25107            Bytes::new(__input)
25108        };
25109        let mut __struct = Self::default();
25110        __struct.time_boot_ms = buf.get_u32_le();
25111        __struct.chan1_scaled = buf.get_i16_le();
25112        __struct.chan2_scaled = buf.get_i16_le();
25113        __struct.chan3_scaled = buf.get_i16_le();
25114        __struct.chan4_scaled = buf.get_i16_le();
25115        __struct.chan5_scaled = buf.get_i16_le();
25116        __struct.chan6_scaled = buf.get_i16_le();
25117        __struct.chan7_scaled = buf.get_i16_le();
25118        __struct.chan8_scaled = buf.get_i16_le();
25119        __struct.port = buf.get_u8();
25120        __struct.rssi = buf.get_u8();
25121        Ok(__struct)
25122    }
25123    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25124        let mut __tmp = BytesMut::new(bytes);
25125        #[allow(clippy::absurd_extreme_comparisons)]
25126        #[allow(unused_comparisons)]
25127        if __tmp.remaining() < Self::ENCODED_LEN {
25128            panic!(
25129                "buffer is too small (need {} bytes, but got {})",
25130                Self::ENCODED_LEN,
25131                __tmp.remaining(),
25132            )
25133        }
25134        __tmp.put_u32_le(self.time_boot_ms);
25135        __tmp.put_i16_le(self.chan1_scaled);
25136        __tmp.put_i16_le(self.chan2_scaled);
25137        __tmp.put_i16_le(self.chan3_scaled);
25138        __tmp.put_i16_le(self.chan4_scaled);
25139        __tmp.put_i16_le(self.chan5_scaled);
25140        __tmp.put_i16_le(self.chan6_scaled);
25141        __tmp.put_i16_le(self.chan7_scaled);
25142        __tmp.put_i16_le(self.chan8_scaled);
25143        __tmp.put_u8(self.port);
25144        __tmp.put_u8(self.rssi);
25145        if matches!(version, MavlinkVersion::V2) {
25146            let len = __tmp.len();
25147            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25148        } else {
25149            __tmp.len()
25150        }
25151    }
25152}
25153#[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
25154#[doc = "id: 66"]
25155#[doc = "Request a data stream."]
25156#[derive(Debug, Clone, PartialEq)]
25157#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25158#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25159pub struct REQUEST_DATA_STREAM_DATA {
25160    #[doc = "The requested message rate"]
25161    pub req_message_rate: u16,
25162    #[doc = "The target requested to send the message stream."]
25163    pub target_system: u8,
25164    #[doc = "The target requested to send the message stream."]
25165    pub target_component: u8,
25166    #[doc = "The ID of the requested data stream"]
25167    pub req_stream_id: u8,
25168    #[doc = "1 to start sending, 0 to stop sending."]
25169    pub start_stop: u8,
25170}
25171impl REQUEST_DATA_STREAM_DATA {
25172    pub const ENCODED_LEN: usize = 6usize;
25173    pub const DEFAULT: Self = Self {
25174        req_message_rate: 0_u16,
25175        target_system: 0_u8,
25176        target_component: 0_u8,
25177        req_stream_id: 0_u8,
25178        start_stop: 0_u8,
25179    };
25180    #[cfg(feature = "arbitrary")]
25181    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25182        use arbitrary::{Arbitrary, Unstructured};
25183        let mut buf = [0u8; 1024];
25184        rng.fill_bytes(&mut buf);
25185        let mut unstructured = Unstructured::new(&buf);
25186        Self::arbitrary(&mut unstructured).unwrap_or_default()
25187    }
25188}
25189impl Default for REQUEST_DATA_STREAM_DATA {
25190    fn default() -> Self {
25191        Self::DEFAULT.clone()
25192    }
25193}
25194impl MessageData for REQUEST_DATA_STREAM_DATA {
25195    type Message = MavMessage;
25196    const ID: u32 = 66u32;
25197    const NAME: &'static str = "REQUEST_DATA_STREAM";
25198    const EXTRA_CRC: u8 = 148u8;
25199    const ENCODED_LEN: usize = 6usize;
25200    fn deser(
25201        _version: MavlinkVersion,
25202        __input: &[u8],
25203    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25204        let avail_len = __input.len();
25205        let mut payload_buf = [0; Self::ENCODED_LEN];
25206        let mut buf = if avail_len < Self::ENCODED_LEN {
25207            payload_buf[0..avail_len].copy_from_slice(__input);
25208            Bytes::new(&payload_buf)
25209        } else {
25210            Bytes::new(__input)
25211        };
25212        let mut __struct = Self::default();
25213        __struct.req_message_rate = buf.get_u16_le();
25214        __struct.target_system = buf.get_u8();
25215        __struct.target_component = buf.get_u8();
25216        __struct.req_stream_id = buf.get_u8();
25217        __struct.start_stop = buf.get_u8();
25218        Ok(__struct)
25219    }
25220    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25221        let mut __tmp = BytesMut::new(bytes);
25222        #[allow(clippy::absurd_extreme_comparisons)]
25223        #[allow(unused_comparisons)]
25224        if __tmp.remaining() < Self::ENCODED_LEN {
25225            panic!(
25226                "buffer is too small (need {} bytes, but got {})",
25227                Self::ENCODED_LEN,
25228                __tmp.remaining(),
25229            )
25230        }
25231        __tmp.put_u16_le(self.req_message_rate);
25232        __tmp.put_u8(self.target_system);
25233        __tmp.put_u8(self.target_component);
25234        __tmp.put_u8(self.req_stream_id);
25235        __tmp.put_u8(self.start_stop);
25236        if matches!(version, MavlinkVersion::V2) {
25237            let len = __tmp.len();
25238            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25239        } else {
25240            __tmp.len()
25241        }
25242    }
25243}
25244#[doc = "id: 412"]
25245#[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
25246#[derive(Debug, Clone, PartialEq)]
25247#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25248#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25249pub struct REQUEST_EVENT_DATA {
25250    #[doc = "First sequence number of the requested event."]
25251    pub first_sequence: u16,
25252    #[doc = "Last sequence number of the requested event."]
25253    pub last_sequence: u16,
25254    #[doc = "System ID"]
25255    pub target_system: u8,
25256    #[doc = "Component ID"]
25257    pub target_component: u8,
25258}
25259impl REQUEST_EVENT_DATA {
25260    pub const ENCODED_LEN: usize = 6usize;
25261    pub const DEFAULT: Self = Self {
25262        first_sequence: 0_u16,
25263        last_sequence: 0_u16,
25264        target_system: 0_u8,
25265        target_component: 0_u8,
25266    };
25267    #[cfg(feature = "arbitrary")]
25268    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25269        use arbitrary::{Arbitrary, Unstructured};
25270        let mut buf = [0u8; 1024];
25271        rng.fill_bytes(&mut buf);
25272        let mut unstructured = Unstructured::new(&buf);
25273        Self::arbitrary(&mut unstructured).unwrap_or_default()
25274    }
25275}
25276impl Default for REQUEST_EVENT_DATA {
25277    fn default() -> Self {
25278        Self::DEFAULT.clone()
25279    }
25280}
25281impl MessageData for REQUEST_EVENT_DATA {
25282    type Message = MavMessage;
25283    const ID: u32 = 412u32;
25284    const NAME: &'static str = "REQUEST_EVENT";
25285    const EXTRA_CRC: u8 = 33u8;
25286    const ENCODED_LEN: usize = 6usize;
25287    fn deser(
25288        _version: MavlinkVersion,
25289        __input: &[u8],
25290    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25291        let avail_len = __input.len();
25292        let mut payload_buf = [0; Self::ENCODED_LEN];
25293        let mut buf = if avail_len < Self::ENCODED_LEN {
25294            payload_buf[0..avail_len].copy_from_slice(__input);
25295            Bytes::new(&payload_buf)
25296        } else {
25297            Bytes::new(__input)
25298        };
25299        let mut __struct = Self::default();
25300        __struct.first_sequence = buf.get_u16_le();
25301        __struct.last_sequence = buf.get_u16_le();
25302        __struct.target_system = buf.get_u8();
25303        __struct.target_component = buf.get_u8();
25304        Ok(__struct)
25305    }
25306    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25307        let mut __tmp = BytesMut::new(bytes);
25308        #[allow(clippy::absurd_extreme_comparisons)]
25309        #[allow(unused_comparisons)]
25310        if __tmp.remaining() < Self::ENCODED_LEN {
25311            panic!(
25312                "buffer is too small (need {} bytes, but got {})",
25313                Self::ENCODED_LEN,
25314                __tmp.remaining(),
25315            )
25316        }
25317        __tmp.put_u16_le(self.first_sequence);
25318        __tmp.put_u16_le(self.last_sequence);
25319        __tmp.put_u8(self.target_system);
25320        __tmp.put_u8(self.target_component);
25321        if matches!(version, MavlinkVersion::V2) {
25322            let len = __tmp.len();
25323            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25324        } else {
25325            __tmp.len()
25326        }
25327    }
25328}
25329#[doc = "id: 142"]
25330#[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
25331#[derive(Debug, Clone, PartialEq)]
25332#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25333#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25334pub struct RESOURCE_REQUEST_DATA {
25335    #[doc = "Request ID. This ID should be re-used when sending back URI contents"]
25336    pub request_id: u8,
25337    #[doc = "The type of requested URI. 0 = a file via URL. 1 = a UAVCAN binary"]
25338    pub uri_type: u8,
25339    #[doc = "The requested unique resource identifier (URI). It is not necessarily a straight domain name (depends on the URI type enum)"]
25340    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25341    pub uri: [u8; 120],
25342    #[doc = "The way the autopilot wants to receive the URI. 0 = MAVLink FTP. 1 = binary stream."]
25343    pub transfer_type: u8,
25344    #[doc = "The storage path the autopilot wants the URI to be stored in. Will only be valid if the transfer_type has a storage associated (e.g. MAVLink FTP)."]
25345    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25346    pub storage: [u8; 120],
25347}
25348impl RESOURCE_REQUEST_DATA {
25349    pub const ENCODED_LEN: usize = 243usize;
25350    pub const DEFAULT: Self = Self {
25351        request_id: 0_u8,
25352        uri_type: 0_u8,
25353        uri: [0_u8; 120usize],
25354        transfer_type: 0_u8,
25355        storage: [0_u8; 120usize],
25356    };
25357    #[cfg(feature = "arbitrary")]
25358    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25359        use arbitrary::{Arbitrary, Unstructured};
25360        let mut buf = [0u8; 1024];
25361        rng.fill_bytes(&mut buf);
25362        let mut unstructured = Unstructured::new(&buf);
25363        Self::arbitrary(&mut unstructured).unwrap_or_default()
25364    }
25365}
25366impl Default for RESOURCE_REQUEST_DATA {
25367    fn default() -> Self {
25368        Self::DEFAULT.clone()
25369    }
25370}
25371impl MessageData for RESOURCE_REQUEST_DATA {
25372    type Message = MavMessage;
25373    const ID: u32 = 142u32;
25374    const NAME: &'static str = "RESOURCE_REQUEST";
25375    const EXTRA_CRC: u8 = 72u8;
25376    const ENCODED_LEN: usize = 243usize;
25377    fn deser(
25378        _version: MavlinkVersion,
25379        __input: &[u8],
25380    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25381        let avail_len = __input.len();
25382        let mut payload_buf = [0; Self::ENCODED_LEN];
25383        let mut buf = if avail_len < Self::ENCODED_LEN {
25384            payload_buf[0..avail_len].copy_from_slice(__input);
25385            Bytes::new(&payload_buf)
25386        } else {
25387            Bytes::new(__input)
25388        };
25389        let mut __struct = Self::default();
25390        __struct.request_id = buf.get_u8();
25391        __struct.uri_type = buf.get_u8();
25392        for v in &mut __struct.uri {
25393            let val = buf.get_u8();
25394            *v = val;
25395        }
25396        __struct.transfer_type = buf.get_u8();
25397        for v in &mut __struct.storage {
25398            let val = buf.get_u8();
25399            *v = val;
25400        }
25401        Ok(__struct)
25402    }
25403    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25404        let mut __tmp = BytesMut::new(bytes);
25405        #[allow(clippy::absurd_extreme_comparisons)]
25406        #[allow(unused_comparisons)]
25407        if __tmp.remaining() < Self::ENCODED_LEN {
25408            panic!(
25409                "buffer is too small (need {} bytes, but got {})",
25410                Self::ENCODED_LEN,
25411                __tmp.remaining(),
25412            )
25413        }
25414        __tmp.put_u8(self.request_id);
25415        __tmp.put_u8(self.uri_type);
25416        for val in &self.uri {
25417            __tmp.put_u8(*val);
25418        }
25419        __tmp.put_u8(self.transfer_type);
25420        for val in &self.storage {
25421            __tmp.put_u8(*val);
25422        }
25423        if matches!(version, MavlinkVersion::V2) {
25424            let len = __tmp.len();
25425            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25426        } else {
25427            __tmp.len()
25428        }
25429    }
25430}
25431#[doc = "id: 413"]
25432#[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
25433#[derive(Debug, Clone, PartialEq)]
25434#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25435#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25436pub struct RESPONSE_EVENT_ERROR_DATA {
25437    #[doc = "Sequence number."]
25438    pub sequence: u16,
25439    #[doc = "Oldest Sequence number that is still available after the sequence set in REQUEST_EVENT."]
25440    pub sequence_oldest_available: u16,
25441    #[doc = "System ID"]
25442    pub target_system: u8,
25443    #[doc = "Component ID"]
25444    pub target_component: u8,
25445    #[doc = "Error reason."]
25446    pub reason: MavEventErrorReason,
25447}
25448impl RESPONSE_EVENT_ERROR_DATA {
25449    pub const ENCODED_LEN: usize = 7usize;
25450    pub const DEFAULT: Self = Self {
25451        sequence: 0_u16,
25452        sequence_oldest_available: 0_u16,
25453        target_system: 0_u8,
25454        target_component: 0_u8,
25455        reason: MavEventErrorReason::DEFAULT,
25456    };
25457    #[cfg(feature = "arbitrary")]
25458    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25459        use arbitrary::{Arbitrary, Unstructured};
25460        let mut buf = [0u8; 1024];
25461        rng.fill_bytes(&mut buf);
25462        let mut unstructured = Unstructured::new(&buf);
25463        Self::arbitrary(&mut unstructured).unwrap_or_default()
25464    }
25465}
25466impl Default for RESPONSE_EVENT_ERROR_DATA {
25467    fn default() -> Self {
25468        Self::DEFAULT.clone()
25469    }
25470}
25471impl MessageData for RESPONSE_EVENT_ERROR_DATA {
25472    type Message = MavMessage;
25473    const ID: u32 = 413u32;
25474    const NAME: &'static str = "RESPONSE_EVENT_ERROR";
25475    const EXTRA_CRC: u8 = 77u8;
25476    const ENCODED_LEN: usize = 7usize;
25477    fn deser(
25478        _version: MavlinkVersion,
25479        __input: &[u8],
25480    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25481        let avail_len = __input.len();
25482        let mut payload_buf = [0; Self::ENCODED_LEN];
25483        let mut buf = if avail_len < Self::ENCODED_LEN {
25484            payload_buf[0..avail_len].copy_from_slice(__input);
25485            Bytes::new(&payload_buf)
25486        } else {
25487            Bytes::new(__input)
25488        };
25489        let mut __struct = Self::default();
25490        __struct.sequence = buf.get_u16_le();
25491        __struct.sequence_oldest_available = buf.get_u16_le();
25492        __struct.target_system = buf.get_u8();
25493        __struct.target_component = buf.get_u8();
25494        let tmp = buf.get_u8();
25495        __struct.reason =
25496            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25497                enum_type: "MavEventErrorReason",
25498                value: tmp as u32,
25499            })?;
25500        Ok(__struct)
25501    }
25502    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25503        let mut __tmp = BytesMut::new(bytes);
25504        #[allow(clippy::absurd_extreme_comparisons)]
25505        #[allow(unused_comparisons)]
25506        if __tmp.remaining() < Self::ENCODED_LEN {
25507            panic!(
25508                "buffer is too small (need {} bytes, but got {})",
25509                Self::ENCODED_LEN,
25510                __tmp.remaining(),
25511            )
25512        }
25513        __tmp.put_u16_le(self.sequence);
25514        __tmp.put_u16_le(self.sequence_oldest_available);
25515        __tmp.put_u8(self.target_system);
25516        __tmp.put_u8(self.target_component);
25517        __tmp.put_u8(self.reason as u8);
25518        if matches!(version, MavlinkVersion::V2) {
25519            let len = __tmp.len();
25520            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25521        } else {
25522            __tmp.len()
25523        }
25524    }
25525}
25526#[doc = "id: 55"]
25527#[doc = "Read out the safety zone the MAV currently assumes."]
25528#[derive(Debug, Clone, PartialEq)]
25529#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25530#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25531pub struct SAFETY_ALLOWED_AREA_DATA {
25532    #[doc = "x position 1 / Latitude 1"]
25533    pub p1x: f32,
25534    #[doc = "y position 1 / Longitude 1"]
25535    pub p1y: f32,
25536    #[doc = "z position 1 / Altitude 1"]
25537    pub p1z: f32,
25538    #[doc = "x position 2 / Latitude 2"]
25539    pub p2x: f32,
25540    #[doc = "y position 2 / Longitude 2"]
25541    pub p2y: f32,
25542    #[doc = "z position 2 / Altitude 2"]
25543    pub p2z: f32,
25544    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
25545    pub frame: MavFrame,
25546}
25547impl SAFETY_ALLOWED_AREA_DATA {
25548    pub const ENCODED_LEN: usize = 25usize;
25549    pub const DEFAULT: Self = Self {
25550        p1x: 0.0_f32,
25551        p1y: 0.0_f32,
25552        p1z: 0.0_f32,
25553        p2x: 0.0_f32,
25554        p2y: 0.0_f32,
25555        p2z: 0.0_f32,
25556        frame: MavFrame::DEFAULT,
25557    };
25558    #[cfg(feature = "arbitrary")]
25559    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25560        use arbitrary::{Arbitrary, Unstructured};
25561        let mut buf = [0u8; 1024];
25562        rng.fill_bytes(&mut buf);
25563        let mut unstructured = Unstructured::new(&buf);
25564        Self::arbitrary(&mut unstructured).unwrap_or_default()
25565    }
25566}
25567impl Default for SAFETY_ALLOWED_AREA_DATA {
25568    fn default() -> Self {
25569        Self::DEFAULT.clone()
25570    }
25571}
25572impl MessageData for SAFETY_ALLOWED_AREA_DATA {
25573    type Message = MavMessage;
25574    const ID: u32 = 55u32;
25575    const NAME: &'static str = "SAFETY_ALLOWED_AREA";
25576    const EXTRA_CRC: u8 = 3u8;
25577    const ENCODED_LEN: usize = 25usize;
25578    fn deser(
25579        _version: MavlinkVersion,
25580        __input: &[u8],
25581    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25582        let avail_len = __input.len();
25583        let mut payload_buf = [0; Self::ENCODED_LEN];
25584        let mut buf = if avail_len < Self::ENCODED_LEN {
25585            payload_buf[0..avail_len].copy_from_slice(__input);
25586            Bytes::new(&payload_buf)
25587        } else {
25588            Bytes::new(__input)
25589        };
25590        let mut __struct = Self::default();
25591        __struct.p1x = buf.get_f32_le();
25592        __struct.p1y = buf.get_f32_le();
25593        __struct.p1z = buf.get_f32_le();
25594        __struct.p2x = buf.get_f32_le();
25595        __struct.p2y = buf.get_f32_le();
25596        __struct.p2z = buf.get_f32_le();
25597        let tmp = buf.get_u8();
25598        __struct.frame =
25599            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25600                enum_type: "MavFrame",
25601                value: tmp as u32,
25602            })?;
25603        Ok(__struct)
25604    }
25605    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25606        let mut __tmp = BytesMut::new(bytes);
25607        #[allow(clippy::absurd_extreme_comparisons)]
25608        #[allow(unused_comparisons)]
25609        if __tmp.remaining() < Self::ENCODED_LEN {
25610            panic!(
25611                "buffer is too small (need {} bytes, but got {})",
25612                Self::ENCODED_LEN,
25613                __tmp.remaining(),
25614            )
25615        }
25616        __tmp.put_f32_le(self.p1x);
25617        __tmp.put_f32_le(self.p1y);
25618        __tmp.put_f32_le(self.p1z);
25619        __tmp.put_f32_le(self.p2x);
25620        __tmp.put_f32_le(self.p2y);
25621        __tmp.put_f32_le(self.p2z);
25622        __tmp.put_u8(self.frame as u8);
25623        if matches!(version, MavlinkVersion::V2) {
25624            let len = __tmp.len();
25625            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25626        } else {
25627            __tmp.len()
25628        }
25629    }
25630}
25631#[doc = "id: 54"]
25632#[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
25633#[derive(Debug, Clone, PartialEq)]
25634#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25635#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25636pub struct SAFETY_SET_ALLOWED_AREA_DATA {
25637    #[doc = "x position 1 / Latitude 1"]
25638    pub p1x: f32,
25639    #[doc = "y position 1 / Longitude 1"]
25640    pub p1y: f32,
25641    #[doc = "z position 1 / Altitude 1"]
25642    pub p1z: f32,
25643    #[doc = "x position 2 / Latitude 2"]
25644    pub p2x: f32,
25645    #[doc = "y position 2 / Longitude 2"]
25646    pub p2y: f32,
25647    #[doc = "z position 2 / Altitude 2"]
25648    pub p2z: f32,
25649    #[doc = "System ID"]
25650    pub target_system: u8,
25651    #[doc = "Component ID"]
25652    pub target_component: u8,
25653    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
25654    pub frame: MavFrame,
25655}
25656impl SAFETY_SET_ALLOWED_AREA_DATA {
25657    pub const ENCODED_LEN: usize = 27usize;
25658    pub const DEFAULT: Self = Self {
25659        p1x: 0.0_f32,
25660        p1y: 0.0_f32,
25661        p1z: 0.0_f32,
25662        p2x: 0.0_f32,
25663        p2y: 0.0_f32,
25664        p2z: 0.0_f32,
25665        target_system: 0_u8,
25666        target_component: 0_u8,
25667        frame: MavFrame::DEFAULT,
25668    };
25669    #[cfg(feature = "arbitrary")]
25670    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25671        use arbitrary::{Arbitrary, Unstructured};
25672        let mut buf = [0u8; 1024];
25673        rng.fill_bytes(&mut buf);
25674        let mut unstructured = Unstructured::new(&buf);
25675        Self::arbitrary(&mut unstructured).unwrap_or_default()
25676    }
25677}
25678impl Default for SAFETY_SET_ALLOWED_AREA_DATA {
25679    fn default() -> Self {
25680        Self::DEFAULT.clone()
25681    }
25682}
25683impl MessageData for SAFETY_SET_ALLOWED_AREA_DATA {
25684    type Message = MavMessage;
25685    const ID: u32 = 54u32;
25686    const NAME: &'static str = "SAFETY_SET_ALLOWED_AREA";
25687    const EXTRA_CRC: u8 = 15u8;
25688    const ENCODED_LEN: usize = 27usize;
25689    fn deser(
25690        _version: MavlinkVersion,
25691        __input: &[u8],
25692    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25693        let avail_len = __input.len();
25694        let mut payload_buf = [0; Self::ENCODED_LEN];
25695        let mut buf = if avail_len < Self::ENCODED_LEN {
25696            payload_buf[0..avail_len].copy_from_slice(__input);
25697            Bytes::new(&payload_buf)
25698        } else {
25699            Bytes::new(__input)
25700        };
25701        let mut __struct = Self::default();
25702        __struct.p1x = buf.get_f32_le();
25703        __struct.p1y = buf.get_f32_le();
25704        __struct.p1z = buf.get_f32_le();
25705        __struct.p2x = buf.get_f32_le();
25706        __struct.p2y = buf.get_f32_le();
25707        __struct.p2z = buf.get_f32_le();
25708        __struct.target_system = buf.get_u8();
25709        __struct.target_component = buf.get_u8();
25710        let tmp = buf.get_u8();
25711        __struct.frame =
25712            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25713                enum_type: "MavFrame",
25714                value: tmp as u32,
25715            })?;
25716        Ok(__struct)
25717    }
25718    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25719        let mut __tmp = BytesMut::new(bytes);
25720        #[allow(clippy::absurd_extreme_comparisons)]
25721        #[allow(unused_comparisons)]
25722        if __tmp.remaining() < Self::ENCODED_LEN {
25723            panic!(
25724                "buffer is too small (need {} bytes, but got {})",
25725                Self::ENCODED_LEN,
25726                __tmp.remaining(),
25727            )
25728        }
25729        __tmp.put_f32_le(self.p1x);
25730        __tmp.put_f32_le(self.p1y);
25731        __tmp.put_f32_le(self.p1z);
25732        __tmp.put_f32_le(self.p2x);
25733        __tmp.put_f32_le(self.p2y);
25734        __tmp.put_f32_le(self.p2z);
25735        __tmp.put_u8(self.target_system);
25736        __tmp.put_u8(self.target_component);
25737        __tmp.put_u8(self.frame as u8);
25738        if matches!(version, MavlinkVersion::V2) {
25739            let len = __tmp.len();
25740            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25741        } else {
25742            __tmp.len()
25743        }
25744    }
25745}
25746#[doc = "id: 26"]
25747#[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
25748#[derive(Debug, Clone, PartialEq)]
25749#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25750#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25751pub struct SCALED_IMU_DATA {
25752    #[doc = "Timestamp (time since system boot)."]
25753    pub time_boot_ms: u32,
25754    #[doc = "X acceleration"]
25755    pub xacc: i16,
25756    #[doc = "Y acceleration"]
25757    pub yacc: i16,
25758    #[doc = "Z acceleration"]
25759    pub zacc: i16,
25760    #[doc = "Angular speed around X axis"]
25761    pub xgyro: i16,
25762    #[doc = "Angular speed around Y axis"]
25763    pub ygyro: i16,
25764    #[doc = "Angular speed around Z axis"]
25765    pub zgyro: i16,
25766    #[doc = "X Magnetic field"]
25767    pub xmag: i16,
25768    #[doc = "Y Magnetic field"]
25769    pub ymag: i16,
25770    #[doc = "Z Magnetic field"]
25771    pub zmag: i16,
25772    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
25773    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25774    pub temperature: i16,
25775}
25776impl SCALED_IMU_DATA {
25777    pub const ENCODED_LEN: usize = 24usize;
25778    pub const DEFAULT: Self = Self {
25779        time_boot_ms: 0_u32,
25780        xacc: 0_i16,
25781        yacc: 0_i16,
25782        zacc: 0_i16,
25783        xgyro: 0_i16,
25784        ygyro: 0_i16,
25785        zgyro: 0_i16,
25786        xmag: 0_i16,
25787        ymag: 0_i16,
25788        zmag: 0_i16,
25789        temperature: 0_i16,
25790    };
25791    #[cfg(feature = "arbitrary")]
25792    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25793        use arbitrary::{Arbitrary, Unstructured};
25794        let mut buf = [0u8; 1024];
25795        rng.fill_bytes(&mut buf);
25796        let mut unstructured = Unstructured::new(&buf);
25797        Self::arbitrary(&mut unstructured).unwrap_or_default()
25798    }
25799}
25800impl Default for SCALED_IMU_DATA {
25801    fn default() -> Self {
25802        Self::DEFAULT.clone()
25803    }
25804}
25805impl MessageData for SCALED_IMU_DATA {
25806    type Message = MavMessage;
25807    const ID: u32 = 26u32;
25808    const NAME: &'static str = "SCALED_IMU";
25809    const EXTRA_CRC: u8 = 170u8;
25810    const ENCODED_LEN: usize = 24usize;
25811    fn deser(
25812        _version: MavlinkVersion,
25813        __input: &[u8],
25814    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25815        let avail_len = __input.len();
25816        let mut payload_buf = [0; Self::ENCODED_LEN];
25817        let mut buf = if avail_len < Self::ENCODED_LEN {
25818            payload_buf[0..avail_len].copy_from_slice(__input);
25819            Bytes::new(&payload_buf)
25820        } else {
25821            Bytes::new(__input)
25822        };
25823        let mut __struct = Self::default();
25824        __struct.time_boot_ms = buf.get_u32_le();
25825        __struct.xacc = buf.get_i16_le();
25826        __struct.yacc = buf.get_i16_le();
25827        __struct.zacc = buf.get_i16_le();
25828        __struct.xgyro = buf.get_i16_le();
25829        __struct.ygyro = buf.get_i16_le();
25830        __struct.zgyro = buf.get_i16_le();
25831        __struct.xmag = buf.get_i16_le();
25832        __struct.ymag = buf.get_i16_le();
25833        __struct.zmag = buf.get_i16_le();
25834        __struct.temperature = buf.get_i16_le();
25835        Ok(__struct)
25836    }
25837    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25838        let mut __tmp = BytesMut::new(bytes);
25839        #[allow(clippy::absurd_extreme_comparisons)]
25840        #[allow(unused_comparisons)]
25841        if __tmp.remaining() < Self::ENCODED_LEN {
25842            panic!(
25843                "buffer is too small (need {} bytes, but got {})",
25844                Self::ENCODED_LEN,
25845                __tmp.remaining(),
25846            )
25847        }
25848        __tmp.put_u32_le(self.time_boot_ms);
25849        __tmp.put_i16_le(self.xacc);
25850        __tmp.put_i16_le(self.yacc);
25851        __tmp.put_i16_le(self.zacc);
25852        __tmp.put_i16_le(self.xgyro);
25853        __tmp.put_i16_le(self.ygyro);
25854        __tmp.put_i16_le(self.zgyro);
25855        __tmp.put_i16_le(self.xmag);
25856        __tmp.put_i16_le(self.ymag);
25857        __tmp.put_i16_le(self.zmag);
25858        __tmp.put_i16_le(self.temperature);
25859        if matches!(version, MavlinkVersion::V2) {
25860            let len = __tmp.len();
25861            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25862        } else {
25863            __tmp.len()
25864        }
25865    }
25866}
25867#[doc = "id: 116"]
25868#[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
25869#[derive(Debug, Clone, PartialEq)]
25870#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25871#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25872pub struct SCALED_IMU2_DATA {
25873    #[doc = "Timestamp (time since system boot)."]
25874    pub time_boot_ms: u32,
25875    #[doc = "X acceleration"]
25876    pub xacc: i16,
25877    #[doc = "Y acceleration"]
25878    pub yacc: i16,
25879    #[doc = "Z acceleration"]
25880    pub zacc: i16,
25881    #[doc = "Angular speed around X axis"]
25882    pub xgyro: i16,
25883    #[doc = "Angular speed around Y axis"]
25884    pub ygyro: i16,
25885    #[doc = "Angular speed around Z axis"]
25886    pub zgyro: i16,
25887    #[doc = "X Magnetic field"]
25888    pub xmag: i16,
25889    #[doc = "Y Magnetic field"]
25890    pub ymag: i16,
25891    #[doc = "Z Magnetic field"]
25892    pub zmag: i16,
25893    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
25894    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25895    pub temperature: i16,
25896}
25897impl SCALED_IMU2_DATA {
25898    pub const ENCODED_LEN: usize = 24usize;
25899    pub const DEFAULT: Self = Self {
25900        time_boot_ms: 0_u32,
25901        xacc: 0_i16,
25902        yacc: 0_i16,
25903        zacc: 0_i16,
25904        xgyro: 0_i16,
25905        ygyro: 0_i16,
25906        zgyro: 0_i16,
25907        xmag: 0_i16,
25908        ymag: 0_i16,
25909        zmag: 0_i16,
25910        temperature: 0_i16,
25911    };
25912    #[cfg(feature = "arbitrary")]
25913    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25914        use arbitrary::{Arbitrary, Unstructured};
25915        let mut buf = [0u8; 1024];
25916        rng.fill_bytes(&mut buf);
25917        let mut unstructured = Unstructured::new(&buf);
25918        Self::arbitrary(&mut unstructured).unwrap_or_default()
25919    }
25920}
25921impl Default for SCALED_IMU2_DATA {
25922    fn default() -> Self {
25923        Self::DEFAULT.clone()
25924    }
25925}
25926impl MessageData for SCALED_IMU2_DATA {
25927    type Message = MavMessage;
25928    const ID: u32 = 116u32;
25929    const NAME: &'static str = "SCALED_IMU2";
25930    const EXTRA_CRC: u8 = 76u8;
25931    const ENCODED_LEN: usize = 24usize;
25932    fn deser(
25933        _version: MavlinkVersion,
25934        __input: &[u8],
25935    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25936        let avail_len = __input.len();
25937        let mut payload_buf = [0; Self::ENCODED_LEN];
25938        let mut buf = if avail_len < Self::ENCODED_LEN {
25939            payload_buf[0..avail_len].copy_from_slice(__input);
25940            Bytes::new(&payload_buf)
25941        } else {
25942            Bytes::new(__input)
25943        };
25944        let mut __struct = Self::default();
25945        __struct.time_boot_ms = buf.get_u32_le();
25946        __struct.xacc = buf.get_i16_le();
25947        __struct.yacc = buf.get_i16_le();
25948        __struct.zacc = buf.get_i16_le();
25949        __struct.xgyro = buf.get_i16_le();
25950        __struct.ygyro = buf.get_i16_le();
25951        __struct.zgyro = buf.get_i16_le();
25952        __struct.xmag = buf.get_i16_le();
25953        __struct.ymag = buf.get_i16_le();
25954        __struct.zmag = buf.get_i16_le();
25955        __struct.temperature = buf.get_i16_le();
25956        Ok(__struct)
25957    }
25958    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25959        let mut __tmp = BytesMut::new(bytes);
25960        #[allow(clippy::absurd_extreme_comparisons)]
25961        #[allow(unused_comparisons)]
25962        if __tmp.remaining() < Self::ENCODED_LEN {
25963            panic!(
25964                "buffer is too small (need {} bytes, but got {})",
25965                Self::ENCODED_LEN,
25966                __tmp.remaining(),
25967            )
25968        }
25969        __tmp.put_u32_le(self.time_boot_ms);
25970        __tmp.put_i16_le(self.xacc);
25971        __tmp.put_i16_le(self.yacc);
25972        __tmp.put_i16_le(self.zacc);
25973        __tmp.put_i16_le(self.xgyro);
25974        __tmp.put_i16_le(self.ygyro);
25975        __tmp.put_i16_le(self.zgyro);
25976        __tmp.put_i16_le(self.xmag);
25977        __tmp.put_i16_le(self.ymag);
25978        __tmp.put_i16_le(self.zmag);
25979        __tmp.put_i16_le(self.temperature);
25980        if matches!(version, MavlinkVersion::V2) {
25981            let len = __tmp.len();
25982            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25983        } else {
25984            __tmp.len()
25985        }
25986    }
25987}
25988#[doc = "id: 129"]
25989#[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
25990#[derive(Debug, Clone, PartialEq)]
25991#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25992#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25993pub struct SCALED_IMU3_DATA {
25994    #[doc = "Timestamp (time since system boot)."]
25995    pub time_boot_ms: u32,
25996    #[doc = "X acceleration"]
25997    pub xacc: i16,
25998    #[doc = "Y acceleration"]
25999    pub yacc: i16,
26000    #[doc = "Z acceleration"]
26001    pub zacc: i16,
26002    #[doc = "Angular speed around X axis"]
26003    pub xgyro: i16,
26004    #[doc = "Angular speed around Y axis"]
26005    pub ygyro: i16,
26006    #[doc = "Angular speed around Z axis"]
26007    pub zgyro: i16,
26008    #[doc = "X Magnetic field"]
26009    pub xmag: i16,
26010    #[doc = "Y Magnetic field"]
26011    pub ymag: i16,
26012    #[doc = "Z Magnetic field"]
26013    pub zmag: i16,
26014    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26015    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26016    pub temperature: i16,
26017}
26018impl SCALED_IMU3_DATA {
26019    pub const ENCODED_LEN: usize = 24usize;
26020    pub const DEFAULT: Self = Self {
26021        time_boot_ms: 0_u32,
26022        xacc: 0_i16,
26023        yacc: 0_i16,
26024        zacc: 0_i16,
26025        xgyro: 0_i16,
26026        ygyro: 0_i16,
26027        zgyro: 0_i16,
26028        xmag: 0_i16,
26029        ymag: 0_i16,
26030        zmag: 0_i16,
26031        temperature: 0_i16,
26032    };
26033    #[cfg(feature = "arbitrary")]
26034    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26035        use arbitrary::{Arbitrary, Unstructured};
26036        let mut buf = [0u8; 1024];
26037        rng.fill_bytes(&mut buf);
26038        let mut unstructured = Unstructured::new(&buf);
26039        Self::arbitrary(&mut unstructured).unwrap_or_default()
26040    }
26041}
26042impl Default for SCALED_IMU3_DATA {
26043    fn default() -> Self {
26044        Self::DEFAULT.clone()
26045    }
26046}
26047impl MessageData for SCALED_IMU3_DATA {
26048    type Message = MavMessage;
26049    const ID: u32 = 129u32;
26050    const NAME: &'static str = "SCALED_IMU3";
26051    const EXTRA_CRC: u8 = 46u8;
26052    const ENCODED_LEN: usize = 24usize;
26053    fn deser(
26054        _version: MavlinkVersion,
26055        __input: &[u8],
26056    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26057        let avail_len = __input.len();
26058        let mut payload_buf = [0; Self::ENCODED_LEN];
26059        let mut buf = if avail_len < Self::ENCODED_LEN {
26060            payload_buf[0..avail_len].copy_from_slice(__input);
26061            Bytes::new(&payload_buf)
26062        } else {
26063            Bytes::new(__input)
26064        };
26065        let mut __struct = Self::default();
26066        __struct.time_boot_ms = buf.get_u32_le();
26067        __struct.xacc = buf.get_i16_le();
26068        __struct.yacc = buf.get_i16_le();
26069        __struct.zacc = buf.get_i16_le();
26070        __struct.xgyro = buf.get_i16_le();
26071        __struct.ygyro = buf.get_i16_le();
26072        __struct.zgyro = buf.get_i16_le();
26073        __struct.xmag = buf.get_i16_le();
26074        __struct.ymag = buf.get_i16_le();
26075        __struct.zmag = buf.get_i16_le();
26076        __struct.temperature = buf.get_i16_le();
26077        Ok(__struct)
26078    }
26079    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26080        let mut __tmp = BytesMut::new(bytes);
26081        #[allow(clippy::absurd_extreme_comparisons)]
26082        #[allow(unused_comparisons)]
26083        if __tmp.remaining() < Self::ENCODED_LEN {
26084            panic!(
26085                "buffer is too small (need {} bytes, but got {})",
26086                Self::ENCODED_LEN,
26087                __tmp.remaining(),
26088            )
26089        }
26090        __tmp.put_u32_le(self.time_boot_ms);
26091        __tmp.put_i16_le(self.xacc);
26092        __tmp.put_i16_le(self.yacc);
26093        __tmp.put_i16_le(self.zacc);
26094        __tmp.put_i16_le(self.xgyro);
26095        __tmp.put_i16_le(self.ygyro);
26096        __tmp.put_i16_le(self.zgyro);
26097        __tmp.put_i16_le(self.xmag);
26098        __tmp.put_i16_le(self.ymag);
26099        __tmp.put_i16_le(self.zmag);
26100        __tmp.put_i16_le(self.temperature);
26101        if matches!(version, MavlinkVersion::V2) {
26102            let len = __tmp.len();
26103            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26104        } else {
26105            __tmp.len()
26106        }
26107    }
26108}
26109#[doc = "id: 29"]
26110#[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
26111#[derive(Debug, Clone, PartialEq)]
26112#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26113#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26114pub struct SCALED_PRESSURE_DATA {
26115    #[doc = "Timestamp (time since system boot)."]
26116    pub time_boot_ms: u32,
26117    #[doc = "Absolute pressure"]
26118    pub press_abs: f32,
26119    #[doc = "Differential pressure 1"]
26120    pub press_diff: f32,
26121    #[doc = "Absolute pressure temperature"]
26122    pub temperature: i16,
26123    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
26124    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26125    pub temperature_press_diff: i16,
26126}
26127impl SCALED_PRESSURE_DATA {
26128    pub const ENCODED_LEN: usize = 16usize;
26129    pub const DEFAULT: Self = Self {
26130        time_boot_ms: 0_u32,
26131        press_abs: 0.0_f32,
26132        press_diff: 0.0_f32,
26133        temperature: 0_i16,
26134        temperature_press_diff: 0_i16,
26135    };
26136    #[cfg(feature = "arbitrary")]
26137    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26138        use arbitrary::{Arbitrary, Unstructured};
26139        let mut buf = [0u8; 1024];
26140        rng.fill_bytes(&mut buf);
26141        let mut unstructured = Unstructured::new(&buf);
26142        Self::arbitrary(&mut unstructured).unwrap_or_default()
26143    }
26144}
26145impl Default for SCALED_PRESSURE_DATA {
26146    fn default() -> Self {
26147        Self::DEFAULT.clone()
26148    }
26149}
26150impl MessageData for SCALED_PRESSURE_DATA {
26151    type Message = MavMessage;
26152    const ID: u32 = 29u32;
26153    const NAME: &'static str = "SCALED_PRESSURE";
26154    const EXTRA_CRC: u8 = 115u8;
26155    const ENCODED_LEN: usize = 16usize;
26156    fn deser(
26157        _version: MavlinkVersion,
26158        __input: &[u8],
26159    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26160        let avail_len = __input.len();
26161        let mut payload_buf = [0; Self::ENCODED_LEN];
26162        let mut buf = if avail_len < Self::ENCODED_LEN {
26163            payload_buf[0..avail_len].copy_from_slice(__input);
26164            Bytes::new(&payload_buf)
26165        } else {
26166            Bytes::new(__input)
26167        };
26168        let mut __struct = Self::default();
26169        __struct.time_boot_ms = buf.get_u32_le();
26170        __struct.press_abs = buf.get_f32_le();
26171        __struct.press_diff = buf.get_f32_le();
26172        __struct.temperature = buf.get_i16_le();
26173        __struct.temperature_press_diff = buf.get_i16_le();
26174        Ok(__struct)
26175    }
26176    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26177        let mut __tmp = BytesMut::new(bytes);
26178        #[allow(clippy::absurd_extreme_comparisons)]
26179        #[allow(unused_comparisons)]
26180        if __tmp.remaining() < Self::ENCODED_LEN {
26181            panic!(
26182                "buffer is too small (need {} bytes, but got {})",
26183                Self::ENCODED_LEN,
26184                __tmp.remaining(),
26185            )
26186        }
26187        __tmp.put_u32_le(self.time_boot_ms);
26188        __tmp.put_f32_le(self.press_abs);
26189        __tmp.put_f32_le(self.press_diff);
26190        __tmp.put_i16_le(self.temperature);
26191        __tmp.put_i16_le(self.temperature_press_diff);
26192        if matches!(version, MavlinkVersion::V2) {
26193            let len = __tmp.len();
26194            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26195        } else {
26196            __tmp.len()
26197        }
26198    }
26199}
26200#[doc = "id: 137"]
26201#[doc = "Barometer readings for 2nd barometer."]
26202#[derive(Debug, Clone, PartialEq)]
26203#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26204#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26205pub struct SCALED_PRESSURE2_DATA {
26206    #[doc = "Timestamp (time since system boot)."]
26207    pub time_boot_ms: u32,
26208    #[doc = "Absolute pressure"]
26209    pub press_abs: f32,
26210    #[doc = "Differential pressure"]
26211    pub press_diff: f32,
26212    #[doc = "Absolute pressure temperature"]
26213    pub temperature: i16,
26214    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
26215    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26216    pub temperature_press_diff: i16,
26217}
26218impl SCALED_PRESSURE2_DATA {
26219    pub const ENCODED_LEN: usize = 16usize;
26220    pub const DEFAULT: Self = Self {
26221        time_boot_ms: 0_u32,
26222        press_abs: 0.0_f32,
26223        press_diff: 0.0_f32,
26224        temperature: 0_i16,
26225        temperature_press_diff: 0_i16,
26226    };
26227    #[cfg(feature = "arbitrary")]
26228    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26229        use arbitrary::{Arbitrary, Unstructured};
26230        let mut buf = [0u8; 1024];
26231        rng.fill_bytes(&mut buf);
26232        let mut unstructured = Unstructured::new(&buf);
26233        Self::arbitrary(&mut unstructured).unwrap_or_default()
26234    }
26235}
26236impl Default for SCALED_PRESSURE2_DATA {
26237    fn default() -> Self {
26238        Self::DEFAULT.clone()
26239    }
26240}
26241impl MessageData for SCALED_PRESSURE2_DATA {
26242    type Message = MavMessage;
26243    const ID: u32 = 137u32;
26244    const NAME: &'static str = "SCALED_PRESSURE2";
26245    const EXTRA_CRC: u8 = 195u8;
26246    const ENCODED_LEN: usize = 16usize;
26247    fn deser(
26248        _version: MavlinkVersion,
26249        __input: &[u8],
26250    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26251        let avail_len = __input.len();
26252        let mut payload_buf = [0; Self::ENCODED_LEN];
26253        let mut buf = if avail_len < Self::ENCODED_LEN {
26254            payload_buf[0..avail_len].copy_from_slice(__input);
26255            Bytes::new(&payload_buf)
26256        } else {
26257            Bytes::new(__input)
26258        };
26259        let mut __struct = Self::default();
26260        __struct.time_boot_ms = buf.get_u32_le();
26261        __struct.press_abs = buf.get_f32_le();
26262        __struct.press_diff = buf.get_f32_le();
26263        __struct.temperature = buf.get_i16_le();
26264        __struct.temperature_press_diff = buf.get_i16_le();
26265        Ok(__struct)
26266    }
26267    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26268        let mut __tmp = BytesMut::new(bytes);
26269        #[allow(clippy::absurd_extreme_comparisons)]
26270        #[allow(unused_comparisons)]
26271        if __tmp.remaining() < Self::ENCODED_LEN {
26272            panic!(
26273                "buffer is too small (need {} bytes, but got {})",
26274                Self::ENCODED_LEN,
26275                __tmp.remaining(),
26276            )
26277        }
26278        __tmp.put_u32_le(self.time_boot_ms);
26279        __tmp.put_f32_le(self.press_abs);
26280        __tmp.put_f32_le(self.press_diff);
26281        __tmp.put_i16_le(self.temperature);
26282        __tmp.put_i16_le(self.temperature_press_diff);
26283        if matches!(version, MavlinkVersion::V2) {
26284            let len = __tmp.len();
26285            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26286        } else {
26287            __tmp.len()
26288        }
26289    }
26290}
26291#[doc = "id: 143"]
26292#[doc = "Barometer readings for 3rd barometer."]
26293#[derive(Debug, Clone, PartialEq)]
26294#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26295#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26296pub struct SCALED_PRESSURE3_DATA {
26297    #[doc = "Timestamp (time since system boot)."]
26298    pub time_boot_ms: u32,
26299    #[doc = "Absolute pressure"]
26300    pub press_abs: f32,
26301    #[doc = "Differential pressure"]
26302    pub press_diff: f32,
26303    #[doc = "Absolute pressure temperature"]
26304    pub temperature: i16,
26305    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
26306    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26307    pub temperature_press_diff: i16,
26308}
26309impl SCALED_PRESSURE3_DATA {
26310    pub const ENCODED_LEN: usize = 16usize;
26311    pub const DEFAULT: Self = Self {
26312        time_boot_ms: 0_u32,
26313        press_abs: 0.0_f32,
26314        press_diff: 0.0_f32,
26315        temperature: 0_i16,
26316        temperature_press_diff: 0_i16,
26317    };
26318    #[cfg(feature = "arbitrary")]
26319    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26320        use arbitrary::{Arbitrary, Unstructured};
26321        let mut buf = [0u8; 1024];
26322        rng.fill_bytes(&mut buf);
26323        let mut unstructured = Unstructured::new(&buf);
26324        Self::arbitrary(&mut unstructured).unwrap_or_default()
26325    }
26326}
26327impl Default for SCALED_PRESSURE3_DATA {
26328    fn default() -> Self {
26329        Self::DEFAULT.clone()
26330    }
26331}
26332impl MessageData for SCALED_PRESSURE3_DATA {
26333    type Message = MavMessage;
26334    const ID: u32 = 143u32;
26335    const NAME: &'static str = "SCALED_PRESSURE3";
26336    const EXTRA_CRC: u8 = 131u8;
26337    const ENCODED_LEN: usize = 16usize;
26338    fn deser(
26339        _version: MavlinkVersion,
26340        __input: &[u8],
26341    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26342        let avail_len = __input.len();
26343        let mut payload_buf = [0; Self::ENCODED_LEN];
26344        let mut buf = if avail_len < Self::ENCODED_LEN {
26345            payload_buf[0..avail_len].copy_from_slice(__input);
26346            Bytes::new(&payload_buf)
26347        } else {
26348            Bytes::new(__input)
26349        };
26350        let mut __struct = Self::default();
26351        __struct.time_boot_ms = buf.get_u32_le();
26352        __struct.press_abs = buf.get_f32_le();
26353        __struct.press_diff = buf.get_f32_le();
26354        __struct.temperature = buf.get_i16_le();
26355        __struct.temperature_press_diff = buf.get_i16_le();
26356        Ok(__struct)
26357    }
26358    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26359        let mut __tmp = BytesMut::new(bytes);
26360        #[allow(clippy::absurd_extreme_comparisons)]
26361        #[allow(unused_comparisons)]
26362        if __tmp.remaining() < Self::ENCODED_LEN {
26363            panic!(
26364                "buffer is too small (need {} bytes, but got {})",
26365                Self::ENCODED_LEN,
26366                __tmp.remaining(),
26367            )
26368        }
26369        __tmp.put_u32_le(self.time_boot_ms);
26370        __tmp.put_f32_le(self.press_abs);
26371        __tmp.put_f32_le(self.press_diff);
26372        __tmp.put_i16_le(self.temperature);
26373        __tmp.put_i16_le(self.temperature_press_diff);
26374        if matches!(version, MavlinkVersion::V2) {
26375            let len = __tmp.len();
26376            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26377        } else {
26378            __tmp.len()
26379        }
26380    }
26381}
26382#[doc = "id: 126"]
26383#[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
26384#[derive(Debug, Clone, PartialEq)]
26385#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26386#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26387pub struct SERIAL_CONTROL_DATA {
26388    #[doc = "Baudrate of transfer. Zero means no change."]
26389    pub baudrate: u32,
26390    #[doc = "Timeout for reply data"]
26391    pub timeout: u16,
26392    #[doc = "Serial control device type."]
26393    pub device: SerialControlDev,
26394    #[doc = "Bitmap of serial control flags."]
26395    pub flags: SerialControlFlag,
26396    #[doc = "how many bytes in this transfer"]
26397    pub count: u8,
26398    #[doc = "serial data"]
26399    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26400    pub data: [u8; 70],
26401    #[doc = "System ID"]
26402    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26403    pub target_system: u8,
26404    #[doc = "Component ID"]
26405    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26406    pub target_component: u8,
26407}
26408impl SERIAL_CONTROL_DATA {
26409    pub const ENCODED_LEN: usize = 81usize;
26410    pub const DEFAULT: Self = Self {
26411        baudrate: 0_u32,
26412        timeout: 0_u16,
26413        device: SerialControlDev::DEFAULT,
26414        flags: SerialControlFlag::DEFAULT,
26415        count: 0_u8,
26416        data: [0_u8; 70usize],
26417        target_system: 0_u8,
26418        target_component: 0_u8,
26419    };
26420    #[cfg(feature = "arbitrary")]
26421    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26422        use arbitrary::{Arbitrary, Unstructured};
26423        let mut buf = [0u8; 1024];
26424        rng.fill_bytes(&mut buf);
26425        let mut unstructured = Unstructured::new(&buf);
26426        Self::arbitrary(&mut unstructured).unwrap_or_default()
26427    }
26428}
26429impl Default for SERIAL_CONTROL_DATA {
26430    fn default() -> Self {
26431        Self::DEFAULT.clone()
26432    }
26433}
26434impl MessageData for SERIAL_CONTROL_DATA {
26435    type Message = MavMessage;
26436    const ID: u32 = 126u32;
26437    const NAME: &'static str = "SERIAL_CONTROL";
26438    const EXTRA_CRC: u8 = 220u8;
26439    const ENCODED_LEN: usize = 81usize;
26440    fn deser(
26441        _version: MavlinkVersion,
26442        __input: &[u8],
26443    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26444        let avail_len = __input.len();
26445        let mut payload_buf = [0; Self::ENCODED_LEN];
26446        let mut buf = if avail_len < Self::ENCODED_LEN {
26447            payload_buf[0..avail_len].copy_from_slice(__input);
26448            Bytes::new(&payload_buf)
26449        } else {
26450            Bytes::new(__input)
26451        };
26452        let mut __struct = Self::default();
26453        __struct.baudrate = buf.get_u32_le();
26454        __struct.timeout = buf.get_u16_le();
26455        let tmp = buf.get_u8();
26456        __struct.device =
26457            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26458                enum_type: "SerialControlDev",
26459                value: tmp as u32,
26460            })?;
26461        let tmp = buf.get_u8();
26462        __struct.flags = SerialControlFlag::from_bits(tmp & SerialControlFlag::all().bits())
26463            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
26464                flag_type: "SerialControlFlag",
26465                value: tmp as u32,
26466            })?;
26467        __struct.count = buf.get_u8();
26468        for v in &mut __struct.data {
26469            let val = buf.get_u8();
26470            *v = val;
26471        }
26472        __struct.target_system = buf.get_u8();
26473        __struct.target_component = buf.get_u8();
26474        Ok(__struct)
26475    }
26476    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26477        let mut __tmp = BytesMut::new(bytes);
26478        #[allow(clippy::absurd_extreme_comparisons)]
26479        #[allow(unused_comparisons)]
26480        if __tmp.remaining() < Self::ENCODED_LEN {
26481            panic!(
26482                "buffer is too small (need {} bytes, but got {})",
26483                Self::ENCODED_LEN,
26484                __tmp.remaining(),
26485            )
26486        }
26487        __tmp.put_u32_le(self.baudrate);
26488        __tmp.put_u16_le(self.timeout);
26489        __tmp.put_u8(self.device as u8);
26490        __tmp.put_u8(self.flags.bits());
26491        __tmp.put_u8(self.count);
26492        for val in &self.data {
26493            __tmp.put_u8(*val);
26494        }
26495        __tmp.put_u8(self.target_system);
26496        __tmp.put_u8(self.target_component);
26497        if matches!(version, MavlinkVersion::V2) {
26498            let len = __tmp.len();
26499            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26500        } else {
26501            __tmp.len()
26502        }
26503    }
26504}
26505#[doc = "id: 36"]
26506#[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
26507#[derive(Debug, Clone, PartialEq)]
26508#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26509#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26510pub struct SERVO_OUTPUT_RAW_DATA {
26511    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
26512    pub time_usec: u32,
26513    #[doc = "Servo output 1 value"]
26514    pub servo1_raw: u16,
26515    #[doc = "Servo output 2 value"]
26516    pub servo2_raw: u16,
26517    #[doc = "Servo output 3 value"]
26518    pub servo3_raw: u16,
26519    #[doc = "Servo output 4 value"]
26520    pub servo4_raw: u16,
26521    #[doc = "Servo output 5 value"]
26522    pub servo5_raw: u16,
26523    #[doc = "Servo output 6 value"]
26524    pub servo6_raw: u16,
26525    #[doc = "Servo output 7 value"]
26526    pub servo7_raw: u16,
26527    #[doc = "Servo output 8 value"]
26528    pub servo8_raw: u16,
26529    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
26530    pub port: u8,
26531    #[doc = "Servo output 9 value"]
26532    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26533    pub servo9_raw: u16,
26534    #[doc = "Servo output 10 value"]
26535    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26536    pub servo10_raw: u16,
26537    #[doc = "Servo output 11 value"]
26538    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26539    pub servo11_raw: u16,
26540    #[doc = "Servo output 12 value"]
26541    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26542    pub servo12_raw: u16,
26543    #[doc = "Servo output 13 value"]
26544    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26545    pub servo13_raw: u16,
26546    #[doc = "Servo output 14 value"]
26547    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26548    pub servo14_raw: u16,
26549    #[doc = "Servo output 15 value"]
26550    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26551    pub servo15_raw: u16,
26552    #[doc = "Servo output 16 value"]
26553    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26554    pub servo16_raw: u16,
26555}
26556impl SERVO_OUTPUT_RAW_DATA {
26557    pub const ENCODED_LEN: usize = 37usize;
26558    pub const DEFAULT: Self = Self {
26559        time_usec: 0_u32,
26560        servo1_raw: 0_u16,
26561        servo2_raw: 0_u16,
26562        servo3_raw: 0_u16,
26563        servo4_raw: 0_u16,
26564        servo5_raw: 0_u16,
26565        servo6_raw: 0_u16,
26566        servo7_raw: 0_u16,
26567        servo8_raw: 0_u16,
26568        port: 0_u8,
26569        servo9_raw: 0_u16,
26570        servo10_raw: 0_u16,
26571        servo11_raw: 0_u16,
26572        servo12_raw: 0_u16,
26573        servo13_raw: 0_u16,
26574        servo14_raw: 0_u16,
26575        servo15_raw: 0_u16,
26576        servo16_raw: 0_u16,
26577    };
26578    #[cfg(feature = "arbitrary")]
26579    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26580        use arbitrary::{Arbitrary, Unstructured};
26581        let mut buf = [0u8; 1024];
26582        rng.fill_bytes(&mut buf);
26583        let mut unstructured = Unstructured::new(&buf);
26584        Self::arbitrary(&mut unstructured).unwrap_or_default()
26585    }
26586}
26587impl Default for SERVO_OUTPUT_RAW_DATA {
26588    fn default() -> Self {
26589        Self::DEFAULT.clone()
26590    }
26591}
26592impl MessageData for SERVO_OUTPUT_RAW_DATA {
26593    type Message = MavMessage;
26594    const ID: u32 = 36u32;
26595    const NAME: &'static str = "SERVO_OUTPUT_RAW";
26596    const EXTRA_CRC: u8 = 222u8;
26597    const ENCODED_LEN: usize = 37usize;
26598    fn deser(
26599        _version: MavlinkVersion,
26600        __input: &[u8],
26601    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26602        let avail_len = __input.len();
26603        let mut payload_buf = [0; Self::ENCODED_LEN];
26604        let mut buf = if avail_len < Self::ENCODED_LEN {
26605            payload_buf[0..avail_len].copy_from_slice(__input);
26606            Bytes::new(&payload_buf)
26607        } else {
26608            Bytes::new(__input)
26609        };
26610        let mut __struct = Self::default();
26611        __struct.time_usec = buf.get_u32_le();
26612        __struct.servo1_raw = buf.get_u16_le();
26613        __struct.servo2_raw = buf.get_u16_le();
26614        __struct.servo3_raw = buf.get_u16_le();
26615        __struct.servo4_raw = buf.get_u16_le();
26616        __struct.servo5_raw = buf.get_u16_le();
26617        __struct.servo6_raw = buf.get_u16_le();
26618        __struct.servo7_raw = buf.get_u16_le();
26619        __struct.servo8_raw = buf.get_u16_le();
26620        __struct.port = buf.get_u8();
26621        __struct.servo9_raw = buf.get_u16_le();
26622        __struct.servo10_raw = buf.get_u16_le();
26623        __struct.servo11_raw = buf.get_u16_le();
26624        __struct.servo12_raw = buf.get_u16_le();
26625        __struct.servo13_raw = buf.get_u16_le();
26626        __struct.servo14_raw = buf.get_u16_le();
26627        __struct.servo15_raw = buf.get_u16_le();
26628        __struct.servo16_raw = buf.get_u16_le();
26629        Ok(__struct)
26630    }
26631    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26632        let mut __tmp = BytesMut::new(bytes);
26633        #[allow(clippy::absurd_extreme_comparisons)]
26634        #[allow(unused_comparisons)]
26635        if __tmp.remaining() < Self::ENCODED_LEN {
26636            panic!(
26637                "buffer is too small (need {} bytes, but got {})",
26638                Self::ENCODED_LEN,
26639                __tmp.remaining(),
26640            )
26641        }
26642        __tmp.put_u32_le(self.time_usec);
26643        __tmp.put_u16_le(self.servo1_raw);
26644        __tmp.put_u16_le(self.servo2_raw);
26645        __tmp.put_u16_le(self.servo3_raw);
26646        __tmp.put_u16_le(self.servo4_raw);
26647        __tmp.put_u16_le(self.servo5_raw);
26648        __tmp.put_u16_le(self.servo6_raw);
26649        __tmp.put_u16_le(self.servo7_raw);
26650        __tmp.put_u16_le(self.servo8_raw);
26651        __tmp.put_u8(self.port);
26652        __tmp.put_u16_le(self.servo9_raw);
26653        __tmp.put_u16_le(self.servo10_raw);
26654        __tmp.put_u16_le(self.servo11_raw);
26655        __tmp.put_u16_le(self.servo12_raw);
26656        __tmp.put_u16_le(self.servo13_raw);
26657        __tmp.put_u16_le(self.servo14_raw);
26658        __tmp.put_u16_le(self.servo15_raw);
26659        __tmp.put_u16_le(self.servo16_raw);
26660        if matches!(version, MavlinkVersion::V2) {
26661            let len = __tmp.len();
26662            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26663        } else {
26664            __tmp.len()
26665        }
26666    }
26667}
26668#[doc = "id: 256"]
26669#[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
26670#[derive(Debug, Clone, PartialEq)]
26671#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26672#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26673pub struct SETUP_SIGNING_DATA {
26674    #[doc = "initial timestamp"]
26675    pub initial_timestamp: u64,
26676    #[doc = "system id of the target"]
26677    pub target_system: u8,
26678    #[doc = "component ID of the target"]
26679    pub target_component: u8,
26680    #[doc = "signing key"]
26681    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26682    pub secret_key: [u8; 32],
26683}
26684impl SETUP_SIGNING_DATA {
26685    pub const ENCODED_LEN: usize = 42usize;
26686    pub const DEFAULT: Self = Self {
26687        initial_timestamp: 0_u64,
26688        target_system: 0_u8,
26689        target_component: 0_u8,
26690        secret_key: [0_u8; 32usize],
26691    };
26692    #[cfg(feature = "arbitrary")]
26693    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26694        use arbitrary::{Arbitrary, Unstructured};
26695        let mut buf = [0u8; 1024];
26696        rng.fill_bytes(&mut buf);
26697        let mut unstructured = Unstructured::new(&buf);
26698        Self::arbitrary(&mut unstructured).unwrap_or_default()
26699    }
26700}
26701impl Default for SETUP_SIGNING_DATA {
26702    fn default() -> Self {
26703        Self::DEFAULT.clone()
26704    }
26705}
26706impl MessageData for SETUP_SIGNING_DATA {
26707    type Message = MavMessage;
26708    const ID: u32 = 256u32;
26709    const NAME: &'static str = "SETUP_SIGNING";
26710    const EXTRA_CRC: u8 = 71u8;
26711    const ENCODED_LEN: usize = 42usize;
26712    fn deser(
26713        _version: MavlinkVersion,
26714        __input: &[u8],
26715    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26716        let avail_len = __input.len();
26717        let mut payload_buf = [0; Self::ENCODED_LEN];
26718        let mut buf = if avail_len < Self::ENCODED_LEN {
26719            payload_buf[0..avail_len].copy_from_slice(__input);
26720            Bytes::new(&payload_buf)
26721        } else {
26722            Bytes::new(__input)
26723        };
26724        let mut __struct = Self::default();
26725        __struct.initial_timestamp = buf.get_u64_le();
26726        __struct.target_system = buf.get_u8();
26727        __struct.target_component = buf.get_u8();
26728        for v in &mut __struct.secret_key {
26729            let val = buf.get_u8();
26730            *v = val;
26731        }
26732        Ok(__struct)
26733    }
26734    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26735        let mut __tmp = BytesMut::new(bytes);
26736        #[allow(clippy::absurd_extreme_comparisons)]
26737        #[allow(unused_comparisons)]
26738        if __tmp.remaining() < Self::ENCODED_LEN {
26739            panic!(
26740                "buffer is too small (need {} bytes, but got {})",
26741                Self::ENCODED_LEN,
26742                __tmp.remaining(),
26743            )
26744        }
26745        __tmp.put_u64_le(self.initial_timestamp);
26746        __tmp.put_u8(self.target_system);
26747        __tmp.put_u8(self.target_component);
26748        for val in &self.secret_key {
26749            __tmp.put_u8(*val);
26750        }
26751        if matches!(version, MavlinkVersion::V2) {
26752            let len = __tmp.len();
26753            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26754        } else {
26755            __tmp.len()
26756        }
26757    }
26758}
26759#[doc = "id: 139"]
26760#[doc = "Set the vehicle attitude and body angular rates."]
26761#[derive(Debug, Clone, PartialEq)]
26762#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26763#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26764pub struct SET_ACTUATOR_CONTROL_TARGET_DATA {
26765    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
26766    pub time_usec: u64,
26767    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
26768    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26769    pub controls: [f32; 8],
26770    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
26771    pub group_mlx: u8,
26772    #[doc = "System ID"]
26773    pub target_system: u8,
26774    #[doc = "Component ID"]
26775    pub target_component: u8,
26776}
26777impl SET_ACTUATOR_CONTROL_TARGET_DATA {
26778    pub const ENCODED_LEN: usize = 43usize;
26779    pub const DEFAULT: Self = Self {
26780        time_usec: 0_u64,
26781        controls: [0.0_f32; 8usize],
26782        group_mlx: 0_u8,
26783        target_system: 0_u8,
26784        target_component: 0_u8,
26785    };
26786    #[cfg(feature = "arbitrary")]
26787    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26788        use arbitrary::{Arbitrary, Unstructured};
26789        let mut buf = [0u8; 1024];
26790        rng.fill_bytes(&mut buf);
26791        let mut unstructured = Unstructured::new(&buf);
26792        Self::arbitrary(&mut unstructured).unwrap_or_default()
26793    }
26794}
26795impl Default for SET_ACTUATOR_CONTROL_TARGET_DATA {
26796    fn default() -> Self {
26797        Self::DEFAULT.clone()
26798    }
26799}
26800impl MessageData for SET_ACTUATOR_CONTROL_TARGET_DATA {
26801    type Message = MavMessage;
26802    const ID: u32 = 139u32;
26803    const NAME: &'static str = "SET_ACTUATOR_CONTROL_TARGET";
26804    const EXTRA_CRC: u8 = 168u8;
26805    const ENCODED_LEN: usize = 43usize;
26806    fn deser(
26807        _version: MavlinkVersion,
26808        __input: &[u8],
26809    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26810        let avail_len = __input.len();
26811        let mut payload_buf = [0; Self::ENCODED_LEN];
26812        let mut buf = if avail_len < Self::ENCODED_LEN {
26813            payload_buf[0..avail_len].copy_from_slice(__input);
26814            Bytes::new(&payload_buf)
26815        } else {
26816            Bytes::new(__input)
26817        };
26818        let mut __struct = Self::default();
26819        __struct.time_usec = buf.get_u64_le();
26820        for v in &mut __struct.controls {
26821            let val = buf.get_f32_le();
26822            *v = val;
26823        }
26824        __struct.group_mlx = buf.get_u8();
26825        __struct.target_system = buf.get_u8();
26826        __struct.target_component = buf.get_u8();
26827        Ok(__struct)
26828    }
26829    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26830        let mut __tmp = BytesMut::new(bytes);
26831        #[allow(clippy::absurd_extreme_comparisons)]
26832        #[allow(unused_comparisons)]
26833        if __tmp.remaining() < Self::ENCODED_LEN {
26834            panic!(
26835                "buffer is too small (need {} bytes, but got {})",
26836                Self::ENCODED_LEN,
26837                __tmp.remaining(),
26838            )
26839        }
26840        __tmp.put_u64_le(self.time_usec);
26841        for val in &self.controls {
26842            __tmp.put_f32_le(*val);
26843        }
26844        __tmp.put_u8(self.group_mlx);
26845        __tmp.put_u8(self.target_system);
26846        __tmp.put_u8(self.target_component);
26847        if matches!(version, MavlinkVersion::V2) {
26848            let len = __tmp.len();
26849            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26850        } else {
26851            __tmp.len()
26852        }
26853    }
26854}
26855#[doc = "id: 82"]
26856#[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
26857#[derive(Debug, Clone, PartialEq)]
26858#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26859#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26860pub struct SET_ATTITUDE_TARGET_DATA {
26861    #[doc = "Timestamp (time since system boot)."]
26862    pub time_boot_ms: u32,
26863    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) from MAV_FRAME_LOCAL_NED to MAV_FRAME_BODY_FRD"]
26864    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26865    pub q: [f32; 4],
26866    #[doc = "Body roll rate"]
26867    pub body_roll_rate: f32,
26868    #[doc = "Body pitch rate"]
26869    pub body_pitch_rate: f32,
26870    #[doc = "Body yaw rate"]
26871    pub body_yaw_rate: f32,
26872    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
26873    pub thrust: f32,
26874    #[doc = "System ID"]
26875    pub target_system: u8,
26876    #[doc = "Component ID"]
26877    pub target_component: u8,
26878    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
26879    pub type_mask: AttitudeTargetTypemask,
26880    #[doc = "3D thrust setpoint in the body NED frame, normalized to -1 .. 1"]
26881    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26882    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26883    pub thrust_body: [f32; 3],
26884}
26885impl SET_ATTITUDE_TARGET_DATA {
26886    pub const ENCODED_LEN: usize = 51usize;
26887    pub const DEFAULT: Self = Self {
26888        time_boot_ms: 0_u32,
26889        q: [0.0_f32; 4usize],
26890        body_roll_rate: 0.0_f32,
26891        body_pitch_rate: 0.0_f32,
26892        body_yaw_rate: 0.0_f32,
26893        thrust: 0.0_f32,
26894        target_system: 0_u8,
26895        target_component: 0_u8,
26896        type_mask: AttitudeTargetTypemask::DEFAULT,
26897        thrust_body: [0.0_f32; 3usize],
26898    };
26899    #[cfg(feature = "arbitrary")]
26900    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26901        use arbitrary::{Arbitrary, Unstructured};
26902        let mut buf = [0u8; 1024];
26903        rng.fill_bytes(&mut buf);
26904        let mut unstructured = Unstructured::new(&buf);
26905        Self::arbitrary(&mut unstructured).unwrap_or_default()
26906    }
26907}
26908impl Default for SET_ATTITUDE_TARGET_DATA {
26909    fn default() -> Self {
26910        Self::DEFAULT.clone()
26911    }
26912}
26913impl MessageData for SET_ATTITUDE_TARGET_DATA {
26914    type Message = MavMessage;
26915    const ID: u32 = 82u32;
26916    const NAME: &'static str = "SET_ATTITUDE_TARGET";
26917    const EXTRA_CRC: u8 = 49u8;
26918    const ENCODED_LEN: usize = 51usize;
26919    fn deser(
26920        _version: MavlinkVersion,
26921        __input: &[u8],
26922    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26923        let avail_len = __input.len();
26924        let mut payload_buf = [0; Self::ENCODED_LEN];
26925        let mut buf = if avail_len < Self::ENCODED_LEN {
26926            payload_buf[0..avail_len].copy_from_slice(__input);
26927            Bytes::new(&payload_buf)
26928        } else {
26929            Bytes::new(__input)
26930        };
26931        let mut __struct = Self::default();
26932        __struct.time_boot_ms = buf.get_u32_le();
26933        for v in &mut __struct.q {
26934            let val = buf.get_f32_le();
26935            *v = val;
26936        }
26937        __struct.body_roll_rate = buf.get_f32_le();
26938        __struct.body_pitch_rate = buf.get_f32_le();
26939        __struct.body_yaw_rate = buf.get_f32_le();
26940        __struct.thrust = buf.get_f32_le();
26941        __struct.target_system = buf.get_u8();
26942        __struct.target_component = buf.get_u8();
26943        let tmp = buf.get_u8();
26944        __struct.type_mask = AttitudeTargetTypemask::from_bits(
26945            tmp & AttitudeTargetTypemask::all().bits(),
26946        )
26947        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
26948            flag_type: "AttitudeTargetTypemask",
26949            value: tmp as u32,
26950        })?;
26951        for v in &mut __struct.thrust_body {
26952            let val = buf.get_f32_le();
26953            *v = val;
26954        }
26955        Ok(__struct)
26956    }
26957    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26958        let mut __tmp = BytesMut::new(bytes);
26959        #[allow(clippy::absurd_extreme_comparisons)]
26960        #[allow(unused_comparisons)]
26961        if __tmp.remaining() < Self::ENCODED_LEN {
26962            panic!(
26963                "buffer is too small (need {} bytes, but got {})",
26964                Self::ENCODED_LEN,
26965                __tmp.remaining(),
26966            )
26967        }
26968        __tmp.put_u32_le(self.time_boot_ms);
26969        for val in &self.q {
26970            __tmp.put_f32_le(*val);
26971        }
26972        __tmp.put_f32_le(self.body_roll_rate);
26973        __tmp.put_f32_le(self.body_pitch_rate);
26974        __tmp.put_f32_le(self.body_yaw_rate);
26975        __tmp.put_f32_le(self.thrust);
26976        __tmp.put_u8(self.target_system);
26977        __tmp.put_u8(self.target_component);
26978        __tmp.put_u8(self.type_mask.bits());
26979        for val in &self.thrust_body {
26980            __tmp.put_f32_le(*val);
26981        }
26982        if matches!(version, MavlinkVersion::V2) {
26983            let len = __tmp.len();
26984            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26985        } else {
26986            __tmp.len()
26987        }
26988    }
26989}
26990#[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
26991#[doc = "id: 48"]
26992#[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
26993#[derive(Debug, Clone, PartialEq)]
26994#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26995#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26996pub struct SET_GPS_GLOBAL_ORIGIN_DATA {
26997    #[doc = "Latitude (WGS84)"]
26998    pub latitude: i32,
26999    #[doc = "Longitude (WGS84)"]
27000    pub longitude: i32,
27001    #[doc = "Altitude (MSL). Positive for up."]
27002    pub altitude: i32,
27003    #[doc = "System ID"]
27004    pub target_system: u8,
27005    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27006    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27007    pub time_usec: u64,
27008}
27009impl SET_GPS_GLOBAL_ORIGIN_DATA {
27010    pub const ENCODED_LEN: usize = 21usize;
27011    pub const DEFAULT: Self = Self {
27012        latitude: 0_i32,
27013        longitude: 0_i32,
27014        altitude: 0_i32,
27015        target_system: 0_u8,
27016        time_usec: 0_u64,
27017    };
27018    #[cfg(feature = "arbitrary")]
27019    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27020        use arbitrary::{Arbitrary, Unstructured};
27021        let mut buf = [0u8; 1024];
27022        rng.fill_bytes(&mut buf);
27023        let mut unstructured = Unstructured::new(&buf);
27024        Self::arbitrary(&mut unstructured).unwrap_or_default()
27025    }
27026}
27027impl Default for SET_GPS_GLOBAL_ORIGIN_DATA {
27028    fn default() -> Self {
27029        Self::DEFAULT.clone()
27030    }
27031}
27032impl MessageData for SET_GPS_GLOBAL_ORIGIN_DATA {
27033    type Message = MavMessage;
27034    const ID: u32 = 48u32;
27035    const NAME: &'static str = "SET_GPS_GLOBAL_ORIGIN";
27036    const EXTRA_CRC: u8 = 41u8;
27037    const ENCODED_LEN: usize = 21usize;
27038    fn deser(
27039        _version: MavlinkVersion,
27040        __input: &[u8],
27041    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27042        let avail_len = __input.len();
27043        let mut payload_buf = [0; Self::ENCODED_LEN];
27044        let mut buf = if avail_len < Self::ENCODED_LEN {
27045            payload_buf[0..avail_len].copy_from_slice(__input);
27046            Bytes::new(&payload_buf)
27047        } else {
27048            Bytes::new(__input)
27049        };
27050        let mut __struct = Self::default();
27051        __struct.latitude = buf.get_i32_le();
27052        __struct.longitude = buf.get_i32_le();
27053        __struct.altitude = buf.get_i32_le();
27054        __struct.target_system = buf.get_u8();
27055        __struct.time_usec = buf.get_u64_le();
27056        Ok(__struct)
27057    }
27058    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27059        let mut __tmp = BytesMut::new(bytes);
27060        #[allow(clippy::absurd_extreme_comparisons)]
27061        #[allow(unused_comparisons)]
27062        if __tmp.remaining() < Self::ENCODED_LEN {
27063            panic!(
27064                "buffer is too small (need {} bytes, but got {})",
27065                Self::ENCODED_LEN,
27066                __tmp.remaining(),
27067            )
27068        }
27069        __tmp.put_i32_le(self.latitude);
27070        __tmp.put_i32_le(self.longitude);
27071        __tmp.put_i32_le(self.altitude);
27072        __tmp.put_u8(self.target_system);
27073        __tmp.put_u64_le(self.time_usec);
27074        if matches!(version, MavlinkVersion::V2) {
27075            let len = __tmp.len();
27076            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27077        } else {
27078            __tmp.len()
27079        }
27080    }
27081}
27082#[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
27083#[doc = "id: 243"]
27084#[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
27085#[derive(Debug, Clone, PartialEq)]
27086#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27087#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27088pub struct SET_HOME_POSITION_DATA {
27089    #[doc = "Latitude (WGS84)"]
27090    pub latitude: i32,
27091    #[doc = "Longitude (WGS84)"]
27092    pub longitude: i32,
27093    #[doc = "Altitude (MSL). Positive for up."]
27094    pub altitude: i32,
27095    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
27096    pub x: f32,
27097    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
27098    pub y: f32,
27099    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
27100    pub z: f32,
27101    #[doc = "World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground"]
27102    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27103    pub q: [f32; 4],
27104    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
27105    pub approach_x: f32,
27106    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
27107    pub approach_y: f32,
27108    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
27109    pub approach_z: f32,
27110    #[doc = "System ID."]
27111    pub target_system: u8,
27112    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27113    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27114    pub time_usec: u64,
27115}
27116impl SET_HOME_POSITION_DATA {
27117    pub const ENCODED_LEN: usize = 61usize;
27118    pub const DEFAULT: Self = Self {
27119        latitude: 0_i32,
27120        longitude: 0_i32,
27121        altitude: 0_i32,
27122        x: 0.0_f32,
27123        y: 0.0_f32,
27124        z: 0.0_f32,
27125        q: [0.0_f32; 4usize],
27126        approach_x: 0.0_f32,
27127        approach_y: 0.0_f32,
27128        approach_z: 0.0_f32,
27129        target_system: 0_u8,
27130        time_usec: 0_u64,
27131    };
27132    #[cfg(feature = "arbitrary")]
27133    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27134        use arbitrary::{Arbitrary, Unstructured};
27135        let mut buf = [0u8; 1024];
27136        rng.fill_bytes(&mut buf);
27137        let mut unstructured = Unstructured::new(&buf);
27138        Self::arbitrary(&mut unstructured).unwrap_or_default()
27139    }
27140}
27141impl Default for SET_HOME_POSITION_DATA {
27142    fn default() -> Self {
27143        Self::DEFAULT.clone()
27144    }
27145}
27146impl MessageData for SET_HOME_POSITION_DATA {
27147    type Message = MavMessage;
27148    const ID: u32 = 243u32;
27149    const NAME: &'static str = "SET_HOME_POSITION";
27150    const EXTRA_CRC: u8 = 85u8;
27151    const ENCODED_LEN: usize = 61usize;
27152    fn deser(
27153        _version: MavlinkVersion,
27154        __input: &[u8],
27155    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27156        let avail_len = __input.len();
27157        let mut payload_buf = [0; Self::ENCODED_LEN];
27158        let mut buf = if avail_len < Self::ENCODED_LEN {
27159            payload_buf[0..avail_len].copy_from_slice(__input);
27160            Bytes::new(&payload_buf)
27161        } else {
27162            Bytes::new(__input)
27163        };
27164        let mut __struct = Self::default();
27165        __struct.latitude = buf.get_i32_le();
27166        __struct.longitude = buf.get_i32_le();
27167        __struct.altitude = buf.get_i32_le();
27168        __struct.x = buf.get_f32_le();
27169        __struct.y = buf.get_f32_le();
27170        __struct.z = buf.get_f32_le();
27171        for v in &mut __struct.q {
27172            let val = buf.get_f32_le();
27173            *v = val;
27174        }
27175        __struct.approach_x = buf.get_f32_le();
27176        __struct.approach_y = buf.get_f32_le();
27177        __struct.approach_z = buf.get_f32_le();
27178        __struct.target_system = buf.get_u8();
27179        __struct.time_usec = buf.get_u64_le();
27180        Ok(__struct)
27181    }
27182    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27183        let mut __tmp = BytesMut::new(bytes);
27184        #[allow(clippy::absurd_extreme_comparisons)]
27185        #[allow(unused_comparisons)]
27186        if __tmp.remaining() < Self::ENCODED_LEN {
27187            panic!(
27188                "buffer is too small (need {} bytes, but got {})",
27189                Self::ENCODED_LEN,
27190                __tmp.remaining(),
27191            )
27192        }
27193        __tmp.put_i32_le(self.latitude);
27194        __tmp.put_i32_le(self.longitude);
27195        __tmp.put_i32_le(self.altitude);
27196        __tmp.put_f32_le(self.x);
27197        __tmp.put_f32_le(self.y);
27198        __tmp.put_f32_le(self.z);
27199        for val in &self.q {
27200            __tmp.put_f32_le(*val);
27201        }
27202        __tmp.put_f32_le(self.approach_x);
27203        __tmp.put_f32_le(self.approach_y);
27204        __tmp.put_f32_le(self.approach_z);
27205        __tmp.put_u8(self.target_system);
27206        __tmp.put_u64_le(self.time_usec);
27207        if matches!(version, MavlinkVersion::V2) {
27208            let len = __tmp.len();
27209            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27210        } else {
27211            __tmp.len()
27212        }
27213    }
27214}
27215#[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
27216#[doc = "id: 11"]
27217#[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
27218#[derive(Debug, Clone, PartialEq)]
27219#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27220#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27221pub struct SET_MODE_DATA {
27222    #[doc = "The new autopilot-specific mode. This field can be ignored by an autopilot."]
27223    pub custom_mode: u32,
27224    #[doc = "The system setting the mode"]
27225    pub target_system: u8,
27226    #[doc = "The new base mode."]
27227    pub base_mode: MavMode,
27228}
27229impl SET_MODE_DATA {
27230    pub const ENCODED_LEN: usize = 6usize;
27231    pub const DEFAULT: Self = Self {
27232        custom_mode: 0_u32,
27233        target_system: 0_u8,
27234        base_mode: MavMode::DEFAULT,
27235    };
27236    #[cfg(feature = "arbitrary")]
27237    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27238        use arbitrary::{Arbitrary, Unstructured};
27239        let mut buf = [0u8; 1024];
27240        rng.fill_bytes(&mut buf);
27241        let mut unstructured = Unstructured::new(&buf);
27242        Self::arbitrary(&mut unstructured).unwrap_or_default()
27243    }
27244}
27245impl Default for SET_MODE_DATA {
27246    fn default() -> Self {
27247        Self::DEFAULT.clone()
27248    }
27249}
27250impl MessageData for SET_MODE_DATA {
27251    type Message = MavMessage;
27252    const ID: u32 = 11u32;
27253    const NAME: &'static str = "SET_MODE";
27254    const EXTRA_CRC: u8 = 89u8;
27255    const ENCODED_LEN: usize = 6usize;
27256    fn deser(
27257        _version: MavlinkVersion,
27258        __input: &[u8],
27259    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27260        let avail_len = __input.len();
27261        let mut payload_buf = [0; Self::ENCODED_LEN];
27262        let mut buf = if avail_len < Self::ENCODED_LEN {
27263            payload_buf[0..avail_len].copy_from_slice(__input);
27264            Bytes::new(&payload_buf)
27265        } else {
27266            Bytes::new(__input)
27267        };
27268        let mut __struct = Self::default();
27269        __struct.custom_mode = buf.get_u32_le();
27270        __struct.target_system = buf.get_u8();
27271        let tmp = buf.get_u8();
27272        __struct.base_mode =
27273            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27274                enum_type: "MavMode",
27275                value: tmp as u32,
27276            })?;
27277        Ok(__struct)
27278    }
27279    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27280        let mut __tmp = BytesMut::new(bytes);
27281        #[allow(clippy::absurd_extreme_comparisons)]
27282        #[allow(unused_comparisons)]
27283        if __tmp.remaining() < Self::ENCODED_LEN {
27284            panic!(
27285                "buffer is too small (need {} bytes, but got {})",
27286                Self::ENCODED_LEN,
27287                __tmp.remaining(),
27288            )
27289        }
27290        __tmp.put_u32_le(self.custom_mode);
27291        __tmp.put_u8(self.target_system);
27292        __tmp.put_u8(self.base_mode as u8);
27293        if matches!(version, MavlinkVersion::V2) {
27294            let len = __tmp.len();
27295            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27296        } else {
27297            __tmp.len()
27298        }
27299    }
27300}
27301#[doc = "id: 86"]
27302#[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
27303#[derive(Debug, Clone, PartialEq)]
27304#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27305#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27306pub struct SET_POSITION_TARGET_GLOBAL_INT_DATA {
27307    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
27308    pub time_boot_ms: u32,
27309    #[doc = "Latitude in WGS84 frame"]
27310    pub lat_int: i32,
27311    #[doc = "Longitude in WGS84 frame"]
27312    pub lon_int: i32,
27313    #[doc = "Altitude (MSL, Relative to home, or AGL - depending on frame)"]
27314    pub alt: f32,
27315    #[doc = "X velocity in NED frame"]
27316    pub vx: f32,
27317    #[doc = "Y velocity in NED frame"]
27318    pub vy: f32,
27319    #[doc = "Z velocity in NED frame"]
27320    pub vz: f32,
27321    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
27322    pub afx: f32,
27323    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
27324    pub afy: f32,
27325    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
27326    pub afz: f32,
27327    #[doc = "yaw setpoint"]
27328    pub yaw: f32,
27329    #[doc = "yaw rate setpoint"]
27330    pub yaw_rate: f32,
27331    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
27332    pub type_mask: PositionTargetTypemask,
27333    #[doc = "System ID"]
27334    pub target_system: u8,
27335    #[doc = "Component ID"]
27336    pub target_component: u8,
27337    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
27338    pub coordinate_frame: MavFrame,
27339}
27340impl SET_POSITION_TARGET_GLOBAL_INT_DATA {
27341    pub const ENCODED_LEN: usize = 53usize;
27342    pub const DEFAULT: Self = Self {
27343        time_boot_ms: 0_u32,
27344        lat_int: 0_i32,
27345        lon_int: 0_i32,
27346        alt: 0.0_f32,
27347        vx: 0.0_f32,
27348        vy: 0.0_f32,
27349        vz: 0.0_f32,
27350        afx: 0.0_f32,
27351        afy: 0.0_f32,
27352        afz: 0.0_f32,
27353        yaw: 0.0_f32,
27354        yaw_rate: 0.0_f32,
27355        type_mask: PositionTargetTypemask::DEFAULT,
27356        target_system: 0_u8,
27357        target_component: 0_u8,
27358        coordinate_frame: MavFrame::DEFAULT,
27359    };
27360    #[cfg(feature = "arbitrary")]
27361    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27362        use arbitrary::{Arbitrary, Unstructured};
27363        let mut buf = [0u8; 1024];
27364        rng.fill_bytes(&mut buf);
27365        let mut unstructured = Unstructured::new(&buf);
27366        Self::arbitrary(&mut unstructured).unwrap_or_default()
27367    }
27368}
27369impl Default for SET_POSITION_TARGET_GLOBAL_INT_DATA {
27370    fn default() -> Self {
27371        Self::DEFAULT.clone()
27372    }
27373}
27374impl MessageData for SET_POSITION_TARGET_GLOBAL_INT_DATA {
27375    type Message = MavMessage;
27376    const ID: u32 = 86u32;
27377    const NAME: &'static str = "SET_POSITION_TARGET_GLOBAL_INT";
27378    const EXTRA_CRC: u8 = 5u8;
27379    const ENCODED_LEN: usize = 53usize;
27380    fn deser(
27381        _version: MavlinkVersion,
27382        __input: &[u8],
27383    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27384        let avail_len = __input.len();
27385        let mut payload_buf = [0; Self::ENCODED_LEN];
27386        let mut buf = if avail_len < Self::ENCODED_LEN {
27387            payload_buf[0..avail_len].copy_from_slice(__input);
27388            Bytes::new(&payload_buf)
27389        } else {
27390            Bytes::new(__input)
27391        };
27392        let mut __struct = Self::default();
27393        __struct.time_boot_ms = buf.get_u32_le();
27394        __struct.lat_int = buf.get_i32_le();
27395        __struct.lon_int = buf.get_i32_le();
27396        __struct.alt = buf.get_f32_le();
27397        __struct.vx = buf.get_f32_le();
27398        __struct.vy = buf.get_f32_le();
27399        __struct.vz = buf.get_f32_le();
27400        __struct.afx = buf.get_f32_le();
27401        __struct.afy = buf.get_f32_le();
27402        __struct.afz = buf.get_f32_le();
27403        __struct.yaw = buf.get_f32_le();
27404        __struct.yaw_rate = buf.get_f32_le();
27405        let tmp = buf.get_u16_le();
27406        __struct.type_mask = PositionTargetTypemask::from_bits(
27407            tmp & PositionTargetTypemask::all().bits(),
27408        )
27409        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
27410            flag_type: "PositionTargetTypemask",
27411            value: tmp as u32,
27412        })?;
27413        __struct.target_system = buf.get_u8();
27414        __struct.target_component = buf.get_u8();
27415        let tmp = buf.get_u8();
27416        __struct.coordinate_frame =
27417            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27418                enum_type: "MavFrame",
27419                value: tmp as u32,
27420            })?;
27421        Ok(__struct)
27422    }
27423    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27424        let mut __tmp = BytesMut::new(bytes);
27425        #[allow(clippy::absurd_extreme_comparisons)]
27426        #[allow(unused_comparisons)]
27427        if __tmp.remaining() < Self::ENCODED_LEN {
27428            panic!(
27429                "buffer is too small (need {} bytes, but got {})",
27430                Self::ENCODED_LEN,
27431                __tmp.remaining(),
27432            )
27433        }
27434        __tmp.put_u32_le(self.time_boot_ms);
27435        __tmp.put_i32_le(self.lat_int);
27436        __tmp.put_i32_le(self.lon_int);
27437        __tmp.put_f32_le(self.alt);
27438        __tmp.put_f32_le(self.vx);
27439        __tmp.put_f32_le(self.vy);
27440        __tmp.put_f32_le(self.vz);
27441        __tmp.put_f32_le(self.afx);
27442        __tmp.put_f32_le(self.afy);
27443        __tmp.put_f32_le(self.afz);
27444        __tmp.put_f32_le(self.yaw);
27445        __tmp.put_f32_le(self.yaw_rate);
27446        __tmp.put_u16_le(self.type_mask.bits());
27447        __tmp.put_u8(self.target_system);
27448        __tmp.put_u8(self.target_component);
27449        __tmp.put_u8(self.coordinate_frame as u8);
27450        if matches!(version, MavlinkVersion::V2) {
27451            let len = __tmp.len();
27452            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27453        } else {
27454            __tmp.len()
27455        }
27456    }
27457}
27458#[doc = "id: 84"]
27459#[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
27460#[derive(Debug, Clone, PartialEq)]
27461#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27462#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27463pub struct SET_POSITION_TARGET_LOCAL_NED_DATA {
27464    #[doc = "Timestamp (time since system boot)."]
27465    pub time_boot_ms: u32,
27466    #[doc = "X Position in NED frame"]
27467    pub x: f32,
27468    #[doc = "Y Position in NED frame"]
27469    pub y: f32,
27470    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
27471    pub z: f32,
27472    #[doc = "X velocity in NED frame"]
27473    pub vx: f32,
27474    #[doc = "Y velocity in NED frame"]
27475    pub vy: f32,
27476    #[doc = "Z velocity in NED frame"]
27477    pub vz: f32,
27478    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
27479    pub afx: f32,
27480    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
27481    pub afy: f32,
27482    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
27483    pub afz: f32,
27484    #[doc = "yaw setpoint"]
27485    pub yaw: f32,
27486    #[doc = "yaw rate setpoint"]
27487    pub yaw_rate: f32,
27488    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
27489    pub type_mask: PositionTargetTypemask,
27490    #[doc = "System ID"]
27491    pub target_system: u8,
27492    #[doc = "Component ID"]
27493    pub target_component: u8,
27494    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
27495    pub coordinate_frame: MavFrame,
27496}
27497impl SET_POSITION_TARGET_LOCAL_NED_DATA {
27498    pub const ENCODED_LEN: usize = 53usize;
27499    pub const DEFAULT: Self = Self {
27500        time_boot_ms: 0_u32,
27501        x: 0.0_f32,
27502        y: 0.0_f32,
27503        z: 0.0_f32,
27504        vx: 0.0_f32,
27505        vy: 0.0_f32,
27506        vz: 0.0_f32,
27507        afx: 0.0_f32,
27508        afy: 0.0_f32,
27509        afz: 0.0_f32,
27510        yaw: 0.0_f32,
27511        yaw_rate: 0.0_f32,
27512        type_mask: PositionTargetTypemask::DEFAULT,
27513        target_system: 0_u8,
27514        target_component: 0_u8,
27515        coordinate_frame: MavFrame::DEFAULT,
27516    };
27517    #[cfg(feature = "arbitrary")]
27518    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27519        use arbitrary::{Arbitrary, Unstructured};
27520        let mut buf = [0u8; 1024];
27521        rng.fill_bytes(&mut buf);
27522        let mut unstructured = Unstructured::new(&buf);
27523        Self::arbitrary(&mut unstructured).unwrap_or_default()
27524    }
27525}
27526impl Default for SET_POSITION_TARGET_LOCAL_NED_DATA {
27527    fn default() -> Self {
27528        Self::DEFAULT.clone()
27529    }
27530}
27531impl MessageData for SET_POSITION_TARGET_LOCAL_NED_DATA {
27532    type Message = MavMessage;
27533    const ID: u32 = 84u32;
27534    const NAME: &'static str = "SET_POSITION_TARGET_LOCAL_NED";
27535    const EXTRA_CRC: u8 = 143u8;
27536    const ENCODED_LEN: usize = 53usize;
27537    fn deser(
27538        _version: MavlinkVersion,
27539        __input: &[u8],
27540    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27541        let avail_len = __input.len();
27542        let mut payload_buf = [0; Self::ENCODED_LEN];
27543        let mut buf = if avail_len < Self::ENCODED_LEN {
27544            payload_buf[0..avail_len].copy_from_slice(__input);
27545            Bytes::new(&payload_buf)
27546        } else {
27547            Bytes::new(__input)
27548        };
27549        let mut __struct = Self::default();
27550        __struct.time_boot_ms = buf.get_u32_le();
27551        __struct.x = buf.get_f32_le();
27552        __struct.y = buf.get_f32_le();
27553        __struct.z = buf.get_f32_le();
27554        __struct.vx = buf.get_f32_le();
27555        __struct.vy = buf.get_f32_le();
27556        __struct.vz = buf.get_f32_le();
27557        __struct.afx = buf.get_f32_le();
27558        __struct.afy = buf.get_f32_le();
27559        __struct.afz = buf.get_f32_le();
27560        __struct.yaw = buf.get_f32_le();
27561        __struct.yaw_rate = buf.get_f32_le();
27562        let tmp = buf.get_u16_le();
27563        __struct.type_mask = PositionTargetTypemask::from_bits(
27564            tmp & PositionTargetTypemask::all().bits(),
27565        )
27566        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
27567            flag_type: "PositionTargetTypemask",
27568            value: tmp as u32,
27569        })?;
27570        __struct.target_system = buf.get_u8();
27571        __struct.target_component = buf.get_u8();
27572        let tmp = buf.get_u8();
27573        __struct.coordinate_frame =
27574            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27575                enum_type: "MavFrame",
27576                value: tmp as u32,
27577            })?;
27578        Ok(__struct)
27579    }
27580    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27581        let mut __tmp = BytesMut::new(bytes);
27582        #[allow(clippy::absurd_extreme_comparisons)]
27583        #[allow(unused_comparisons)]
27584        if __tmp.remaining() < Self::ENCODED_LEN {
27585            panic!(
27586                "buffer is too small (need {} bytes, but got {})",
27587                Self::ENCODED_LEN,
27588                __tmp.remaining(),
27589            )
27590        }
27591        __tmp.put_u32_le(self.time_boot_ms);
27592        __tmp.put_f32_le(self.x);
27593        __tmp.put_f32_le(self.y);
27594        __tmp.put_f32_le(self.z);
27595        __tmp.put_f32_le(self.vx);
27596        __tmp.put_f32_le(self.vy);
27597        __tmp.put_f32_le(self.vz);
27598        __tmp.put_f32_le(self.afx);
27599        __tmp.put_f32_le(self.afy);
27600        __tmp.put_f32_le(self.afz);
27601        __tmp.put_f32_le(self.yaw);
27602        __tmp.put_f32_le(self.yaw_rate);
27603        __tmp.put_u16_le(self.type_mask.bits());
27604        __tmp.put_u8(self.target_system);
27605        __tmp.put_u8(self.target_component);
27606        __tmp.put_u8(self.coordinate_frame as u8);
27607        if matches!(version, MavlinkVersion::V2) {
27608            let len = __tmp.len();
27609            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27610        } else {
27611            __tmp.len()
27612        }
27613    }
27614}
27615#[doc = "id: 108"]
27616#[doc = "Status of simulation environment, if used."]
27617#[derive(Debug, Clone, PartialEq)]
27618#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27619#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27620pub struct SIM_STATE_DATA {
27621    #[doc = "True attitude quaternion component 1, w (1 in null-rotation)"]
27622    pub q1: f32,
27623    #[doc = "True attitude quaternion component 2, x (0 in null-rotation)"]
27624    pub q2: f32,
27625    #[doc = "True attitude quaternion component 3, y (0 in null-rotation)"]
27626    pub q3: f32,
27627    #[doc = "True attitude quaternion component 4, z (0 in null-rotation)"]
27628    pub q4: f32,
27629    #[doc = "Attitude roll expressed as Euler angles, not recommended except for human-readable outputs"]
27630    pub roll: f32,
27631    #[doc = "Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs"]
27632    pub pitch: f32,
27633    #[doc = "Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs"]
27634    pub yaw: f32,
27635    #[doc = "X acceleration"]
27636    pub xacc: f32,
27637    #[doc = "Y acceleration"]
27638    pub yacc: f32,
27639    #[doc = "Z acceleration"]
27640    pub zacc: f32,
27641    #[doc = "Angular speed around X axis"]
27642    pub xgyro: f32,
27643    #[doc = "Angular speed around Y axis"]
27644    pub ygyro: f32,
27645    #[doc = "Angular speed around Z axis"]
27646    pub zgyro: f32,
27647    #[doc = "Latitude (lower precision). Both this and the lat_int field should be set."]
27648    pub lat: f32,
27649    #[doc = "Longitude (lower precision). Both this and the lon_int field should be set."]
27650    pub lon: f32,
27651    #[doc = "Altitude"]
27652    pub alt: f32,
27653    #[doc = "Horizontal position standard deviation"]
27654    pub std_dev_horz: f32,
27655    #[doc = "Vertical position standard deviation"]
27656    pub std_dev_vert: f32,
27657    #[doc = "True velocity in north direction in earth-fixed NED frame"]
27658    pub vn: f32,
27659    #[doc = "True velocity in east direction in earth-fixed NED frame"]
27660    pub ve: f32,
27661    #[doc = "True velocity in down direction in earth-fixed NED frame"]
27662    pub vd: f32,
27663    #[doc = "Latitude (higher precision). If 0, recipients should use the lat field value (otherwise this field is preferred)."]
27664    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27665    pub lat_int: i32,
27666    #[doc = "Longitude (higher precision). If 0, recipients should use the lon field value (otherwise this field is preferred)."]
27667    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27668    pub lon_int: i32,
27669}
27670impl SIM_STATE_DATA {
27671    pub const ENCODED_LEN: usize = 92usize;
27672    pub const DEFAULT: Self = Self {
27673        q1: 0.0_f32,
27674        q2: 0.0_f32,
27675        q3: 0.0_f32,
27676        q4: 0.0_f32,
27677        roll: 0.0_f32,
27678        pitch: 0.0_f32,
27679        yaw: 0.0_f32,
27680        xacc: 0.0_f32,
27681        yacc: 0.0_f32,
27682        zacc: 0.0_f32,
27683        xgyro: 0.0_f32,
27684        ygyro: 0.0_f32,
27685        zgyro: 0.0_f32,
27686        lat: 0.0_f32,
27687        lon: 0.0_f32,
27688        alt: 0.0_f32,
27689        std_dev_horz: 0.0_f32,
27690        std_dev_vert: 0.0_f32,
27691        vn: 0.0_f32,
27692        ve: 0.0_f32,
27693        vd: 0.0_f32,
27694        lat_int: 0_i32,
27695        lon_int: 0_i32,
27696    };
27697    #[cfg(feature = "arbitrary")]
27698    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27699        use arbitrary::{Arbitrary, Unstructured};
27700        let mut buf = [0u8; 1024];
27701        rng.fill_bytes(&mut buf);
27702        let mut unstructured = Unstructured::new(&buf);
27703        Self::arbitrary(&mut unstructured).unwrap_or_default()
27704    }
27705}
27706impl Default for SIM_STATE_DATA {
27707    fn default() -> Self {
27708        Self::DEFAULT.clone()
27709    }
27710}
27711impl MessageData for SIM_STATE_DATA {
27712    type Message = MavMessage;
27713    const ID: u32 = 108u32;
27714    const NAME: &'static str = "SIM_STATE";
27715    const EXTRA_CRC: u8 = 32u8;
27716    const ENCODED_LEN: usize = 92usize;
27717    fn deser(
27718        _version: MavlinkVersion,
27719        __input: &[u8],
27720    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27721        let avail_len = __input.len();
27722        let mut payload_buf = [0; Self::ENCODED_LEN];
27723        let mut buf = if avail_len < Self::ENCODED_LEN {
27724            payload_buf[0..avail_len].copy_from_slice(__input);
27725            Bytes::new(&payload_buf)
27726        } else {
27727            Bytes::new(__input)
27728        };
27729        let mut __struct = Self::default();
27730        __struct.q1 = buf.get_f32_le();
27731        __struct.q2 = buf.get_f32_le();
27732        __struct.q3 = buf.get_f32_le();
27733        __struct.q4 = buf.get_f32_le();
27734        __struct.roll = buf.get_f32_le();
27735        __struct.pitch = buf.get_f32_le();
27736        __struct.yaw = buf.get_f32_le();
27737        __struct.xacc = buf.get_f32_le();
27738        __struct.yacc = buf.get_f32_le();
27739        __struct.zacc = buf.get_f32_le();
27740        __struct.xgyro = buf.get_f32_le();
27741        __struct.ygyro = buf.get_f32_le();
27742        __struct.zgyro = buf.get_f32_le();
27743        __struct.lat = buf.get_f32_le();
27744        __struct.lon = buf.get_f32_le();
27745        __struct.alt = buf.get_f32_le();
27746        __struct.std_dev_horz = buf.get_f32_le();
27747        __struct.std_dev_vert = buf.get_f32_le();
27748        __struct.vn = buf.get_f32_le();
27749        __struct.ve = buf.get_f32_le();
27750        __struct.vd = buf.get_f32_le();
27751        __struct.lat_int = buf.get_i32_le();
27752        __struct.lon_int = buf.get_i32_le();
27753        Ok(__struct)
27754    }
27755    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27756        let mut __tmp = BytesMut::new(bytes);
27757        #[allow(clippy::absurd_extreme_comparisons)]
27758        #[allow(unused_comparisons)]
27759        if __tmp.remaining() < Self::ENCODED_LEN {
27760            panic!(
27761                "buffer is too small (need {} bytes, but got {})",
27762                Self::ENCODED_LEN,
27763                __tmp.remaining(),
27764            )
27765        }
27766        __tmp.put_f32_le(self.q1);
27767        __tmp.put_f32_le(self.q2);
27768        __tmp.put_f32_le(self.q3);
27769        __tmp.put_f32_le(self.q4);
27770        __tmp.put_f32_le(self.roll);
27771        __tmp.put_f32_le(self.pitch);
27772        __tmp.put_f32_le(self.yaw);
27773        __tmp.put_f32_le(self.xacc);
27774        __tmp.put_f32_le(self.yacc);
27775        __tmp.put_f32_le(self.zacc);
27776        __tmp.put_f32_le(self.xgyro);
27777        __tmp.put_f32_le(self.ygyro);
27778        __tmp.put_f32_le(self.zgyro);
27779        __tmp.put_f32_le(self.lat);
27780        __tmp.put_f32_le(self.lon);
27781        __tmp.put_f32_le(self.alt);
27782        __tmp.put_f32_le(self.std_dev_horz);
27783        __tmp.put_f32_le(self.std_dev_vert);
27784        __tmp.put_f32_le(self.vn);
27785        __tmp.put_f32_le(self.ve);
27786        __tmp.put_f32_le(self.vd);
27787        __tmp.put_i32_le(self.lat_int);
27788        __tmp.put_i32_le(self.lon_int);
27789        if matches!(version, MavlinkVersion::V2) {
27790            let len = __tmp.len();
27791            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27792        } else {
27793            __tmp.len()
27794        }
27795    }
27796}
27797#[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
27798#[doc = "id: 370"]
27799#[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
27800#[derive(Debug, Clone, PartialEq)]
27801#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27802#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27803pub struct SMART_BATTERY_INFO_DATA {
27804    #[doc = "Capacity when full according to manufacturer, -1: field not provided."]
27805    pub capacity_full_specification: i32,
27806    #[doc = "Capacity when full (accounting for battery degradation), -1: field not provided."]
27807    pub capacity_full: i32,
27808    #[doc = "Charge/discharge cycle count. UINT16_MAX: field not provided."]
27809    pub cycle_count: u16,
27810    #[doc = "Battery weight. 0: field not provided."]
27811    pub weight: u16,
27812    #[doc = "Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value."]
27813    pub discharge_minimum_voltage: u16,
27814    #[doc = "Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value."]
27815    pub charging_minimum_voltage: u16,
27816    #[doc = "Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value."]
27817    pub resting_minimum_voltage: u16,
27818    #[doc = "Battery ID"]
27819    pub id: u8,
27820    #[doc = "Function of the battery"]
27821    pub battery_function: MavBatteryFunction,
27822    #[doc = "Type (chemistry) of the battery"]
27823    pub mavtype: MavBatteryType,
27824    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
27825    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27826    pub serial_number: [u8; 16],
27827    #[doc = "Static device name in ASCII characters, 0 terminated. All 0: field not provided. Encode as manufacturer name then product name separated using an underscore."]
27828    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27829    pub device_name: [u8; 50],
27830    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
27831    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27832    pub charging_maximum_voltage: u16,
27833    #[doc = "Number of battery cells in series. 0: field not provided."]
27834    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27835    pub cells_in_series: u8,
27836    #[doc = "Maximum pack discharge current. 0: field not provided."]
27837    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27838    pub discharge_maximum_current: u32,
27839    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
27840    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27841    pub discharge_maximum_burst_current: u32,
27842    #[doc = "Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
27843    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27844    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27845    pub manufacture_date: [u8; 11],
27846}
27847impl SMART_BATTERY_INFO_DATA {
27848    pub const ENCODED_LEN: usize = 109usize;
27849    pub const DEFAULT: Self = Self {
27850        capacity_full_specification: 0_i32,
27851        capacity_full: 0_i32,
27852        cycle_count: 0_u16,
27853        weight: 0_u16,
27854        discharge_minimum_voltage: 0_u16,
27855        charging_minimum_voltage: 0_u16,
27856        resting_minimum_voltage: 0_u16,
27857        id: 0_u8,
27858        battery_function: MavBatteryFunction::DEFAULT,
27859        mavtype: MavBatteryType::DEFAULT,
27860        serial_number: [0_u8; 16usize],
27861        device_name: [0_u8; 50usize],
27862        charging_maximum_voltage: 0_u16,
27863        cells_in_series: 0_u8,
27864        discharge_maximum_current: 0_u32,
27865        discharge_maximum_burst_current: 0_u32,
27866        manufacture_date: [0_u8; 11usize],
27867    };
27868    #[cfg(feature = "arbitrary")]
27869    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27870        use arbitrary::{Arbitrary, Unstructured};
27871        let mut buf = [0u8; 1024];
27872        rng.fill_bytes(&mut buf);
27873        let mut unstructured = Unstructured::new(&buf);
27874        Self::arbitrary(&mut unstructured).unwrap_or_default()
27875    }
27876}
27877impl Default for SMART_BATTERY_INFO_DATA {
27878    fn default() -> Self {
27879        Self::DEFAULT.clone()
27880    }
27881}
27882impl MessageData for SMART_BATTERY_INFO_DATA {
27883    type Message = MavMessage;
27884    const ID: u32 = 370u32;
27885    const NAME: &'static str = "SMART_BATTERY_INFO";
27886    const EXTRA_CRC: u8 = 75u8;
27887    const ENCODED_LEN: usize = 109usize;
27888    fn deser(
27889        _version: MavlinkVersion,
27890        __input: &[u8],
27891    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27892        let avail_len = __input.len();
27893        let mut payload_buf = [0; Self::ENCODED_LEN];
27894        let mut buf = if avail_len < Self::ENCODED_LEN {
27895            payload_buf[0..avail_len].copy_from_slice(__input);
27896            Bytes::new(&payload_buf)
27897        } else {
27898            Bytes::new(__input)
27899        };
27900        let mut __struct = Self::default();
27901        __struct.capacity_full_specification = buf.get_i32_le();
27902        __struct.capacity_full = buf.get_i32_le();
27903        __struct.cycle_count = buf.get_u16_le();
27904        __struct.weight = buf.get_u16_le();
27905        __struct.discharge_minimum_voltage = buf.get_u16_le();
27906        __struct.charging_minimum_voltage = buf.get_u16_le();
27907        __struct.resting_minimum_voltage = buf.get_u16_le();
27908        __struct.id = buf.get_u8();
27909        let tmp = buf.get_u8();
27910        __struct.battery_function =
27911            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27912                enum_type: "MavBatteryFunction",
27913                value: tmp as u32,
27914            })?;
27915        let tmp = buf.get_u8();
27916        __struct.mavtype =
27917            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27918                enum_type: "MavBatteryType",
27919                value: tmp as u32,
27920            })?;
27921        for v in &mut __struct.serial_number {
27922            let val = buf.get_u8();
27923            *v = val;
27924        }
27925        for v in &mut __struct.device_name {
27926            let val = buf.get_u8();
27927            *v = val;
27928        }
27929        __struct.charging_maximum_voltage = buf.get_u16_le();
27930        __struct.cells_in_series = buf.get_u8();
27931        __struct.discharge_maximum_current = buf.get_u32_le();
27932        __struct.discharge_maximum_burst_current = buf.get_u32_le();
27933        for v in &mut __struct.manufacture_date {
27934            let val = buf.get_u8();
27935            *v = val;
27936        }
27937        Ok(__struct)
27938    }
27939    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27940        let mut __tmp = BytesMut::new(bytes);
27941        #[allow(clippy::absurd_extreme_comparisons)]
27942        #[allow(unused_comparisons)]
27943        if __tmp.remaining() < Self::ENCODED_LEN {
27944            panic!(
27945                "buffer is too small (need {} bytes, but got {})",
27946                Self::ENCODED_LEN,
27947                __tmp.remaining(),
27948            )
27949        }
27950        __tmp.put_i32_le(self.capacity_full_specification);
27951        __tmp.put_i32_le(self.capacity_full);
27952        __tmp.put_u16_le(self.cycle_count);
27953        __tmp.put_u16_le(self.weight);
27954        __tmp.put_u16_le(self.discharge_minimum_voltage);
27955        __tmp.put_u16_le(self.charging_minimum_voltage);
27956        __tmp.put_u16_le(self.resting_minimum_voltage);
27957        __tmp.put_u8(self.id);
27958        __tmp.put_u8(self.battery_function as u8);
27959        __tmp.put_u8(self.mavtype as u8);
27960        for val in &self.serial_number {
27961            __tmp.put_u8(*val);
27962        }
27963        for val in &self.device_name {
27964            __tmp.put_u8(*val);
27965        }
27966        __tmp.put_u16_le(self.charging_maximum_voltage);
27967        __tmp.put_u8(self.cells_in_series);
27968        __tmp.put_u32_le(self.discharge_maximum_current);
27969        __tmp.put_u32_le(self.discharge_maximum_burst_current);
27970        for val in &self.manufacture_date {
27971            __tmp.put_u8(*val);
27972        }
27973        if matches!(version, MavlinkVersion::V2) {
27974            let len = __tmp.len();
27975            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27976        } else {
27977            __tmp.len()
27978        }
27979    }
27980}
27981#[doc = "id: 253"]
27982#[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
27983#[derive(Debug, Clone, PartialEq)]
27984#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27985#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27986pub struct STATUSTEXT_DATA {
27987    #[doc = "Severity of status. Relies on the definitions within RFC-5424."]
27988    pub severity: MavSeverity,
27989    #[doc = "Status text message, without null termination character"]
27990    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27991    pub text: [u8; 50],
27992    #[doc = "Unique (opaque) identifier for this statustext message.  May be used to reassemble a logical long-statustext message from a sequence of chunks.  A value of zero indicates this is the only chunk in the sequence and the message can be emitted immediately."]
27993    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27994    pub id: u16,
27995    #[doc = "This chunk's sequence number; indexing is from zero.  Any null character in the text field is taken to mean this was the last chunk."]
27996    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27997    pub chunk_seq: u8,
27998}
27999impl STATUSTEXT_DATA {
28000    pub const ENCODED_LEN: usize = 54usize;
28001    pub const DEFAULT: Self = Self {
28002        severity: MavSeverity::DEFAULT,
28003        text: [0_u8; 50usize],
28004        id: 0_u16,
28005        chunk_seq: 0_u8,
28006    };
28007    #[cfg(feature = "arbitrary")]
28008    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28009        use arbitrary::{Arbitrary, Unstructured};
28010        let mut buf = [0u8; 1024];
28011        rng.fill_bytes(&mut buf);
28012        let mut unstructured = Unstructured::new(&buf);
28013        Self::arbitrary(&mut unstructured).unwrap_or_default()
28014    }
28015}
28016impl Default for STATUSTEXT_DATA {
28017    fn default() -> Self {
28018        Self::DEFAULT.clone()
28019    }
28020}
28021impl MessageData for STATUSTEXT_DATA {
28022    type Message = MavMessage;
28023    const ID: u32 = 253u32;
28024    const NAME: &'static str = "STATUSTEXT";
28025    const EXTRA_CRC: u8 = 83u8;
28026    const ENCODED_LEN: usize = 54usize;
28027    fn deser(
28028        _version: MavlinkVersion,
28029        __input: &[u8],
28030    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28031        let avail_len = __input.len();
28032        let mut payload_buf = [0; Self::ENCODED_LEN];
28033        let mut buf = if avail_len < Self::ENCODED_LEN {
28034            payload_buf[0..avail_len].copy_from_slice(__input);
28035            Bytes::new(&payload_buf)
28036        } else {
28037            Bytes::new(__input)
28038        };
28039        let mut __struct = Self::default();
28040        let tmp = buf.get_u8();
28041        __struct.severity =
28042            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28043                enum_type: "MavSeverity",
28044                value: tmp as u32,
28045            })?;
28046        for v in &mut __struct.text {
28047            let val = buf.get_u8();
28048            *v = val;
28049        }
28050        __struct.id = buf.get_u16_le();
28051        __struct.chunk_seq = buf.get_u8();
28052        Ok(__struct)
28053    }
28054    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28055        let mut __tmp = BytesMut::new(bytes);
28056        #[allow(clippy::absurd_extreme_comparisons)]
28057        #[allow(unused_comparisons)]
28058        if __tmp.remaining() < Self::ENCODED_LEN {
28059            panic!(
28060                "buffer is too small (need {} bytes, but got {})",
28061                Self::ENCODED_LEN,
28062                __tmp.remaining(),
28063            )
28064        }
28065        __tmp.put_u8(self.severity as u8);
28066        for val in &self.text {
28067            __tmp.put_u8(*val);
28068        }
28069        __tmp.put_u16_le(self.id);
28070        __tmp.put_u8(self.chunk_seq);
28071        if matches!(version, MavlinkVersion::V2) {
28072            let len = __tmp.len();
28073            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28074        } else {
28075            __tmp.len()
28076        }
28077    }
28078}
28079#[doc = "id: 261"]
28080#[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
28081#[derive(Debug, Clone, PartialEq)]
28082#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28083#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28084pub struct STORAGE_INFORMATION_DATA {
28085    #[doc = "Timestamp (time since system boot)."]
28086    pub time_boot_ms: u32,
28087    #[doc = "Total capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
28088    pub total_capacity: f32,
28089    #[doc = "Used capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
28090    pub used_capacity: f32,
28091    #[doc = "Available storage capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
28092    pub available_capacity: f32,
28093    #[doc = "Read speed."]
28094    pub read_speed: f32,
28095    #[doc = "Write speed."]
28096    pub write_speed: f32,
28097    #[doc = "Storage ID (1 for first, 2 for second, etc.)"]
28098    pub storage_id: u8,
28099    #[doc = "Number of storage devices"]
28100    pub storage_count: u8,
28101    #[doc = "Status of storage"]
28102    pub status: StorageStatus,
28103    #[doc = "Type of storage"]
28104    #[cfg_attr(feature = "serde", serde(default))]
28105    pub mavtype: StorageType,
28106    #[doc = "Textual storage name to be used in UI (microSD 1, Internal Memory, etc.) This is a NULL terminated string. If it is exactly 32 characters long, add a terminating NULL. If this string is empty, the generic type is shown to the user."]
28107    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28108    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28109    pub name: [u8; 32],
28110    #[doc = "Flags indicating whether this instance is preferred storage for photos, videos, etc.         Note: Implementations should initially set the flags on the system-default storage id used for saving media (if possible/supported).         This setting can then be overridden using MAV_CMD_SET_STORAGE_USAGE.         If the media usage flags are not set, a GCS may assume storage ID 1 is the default storage for all media types."]
28111    #[cfg_attr(feature = "serde", serde(default))]
28112    pub storage_usage: StorageUsageFlag,
28113}
28114impl STORAGE_INFORMATION_DATA {
28115    pub const ENCODED_LEN: usize = 61usize;
28116    pub const DEFAULT: Self = Self {
28117        time_boot_ms: 0_u32,
28118        total_capacity: 0.0_f32,
28119        used_capacity: 0.0_f32,
28120        available_capacity: 0.0_f32,
28121        read_speed: 0.0_f32,
28122        write_speed: 0.0_f32,
28123        storage_id: 0_u8,
28124        storage_count: 0_u8,
28125        status: StorageStatus::DEFAULT,
28126        mavtype: StorageType::DEFAULT,
28127        name: [0_u8; 32usize],
28128        storage_usage: StorageUsageFlag::DEFAULT,
28129    };
28130    #[cfg(feature = "arbitrary")]
28131    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28132        use arbitrary::{Arbitrary, Unstructured};
28133        let mut buf = [0u8; 1024];
28134        rng.fill_bytes(&mut buf);
28135        let mut unstructured = Unstructured::new(&buf);
28136        Self::arbitrary(&mut unstructured).unwrap_or_default()
28137    }
28138}
28139impl Default for STORAGE_INFORMATION_DATA {
28140    fn default() -> Self {
28141        Self::DEFAULT.clone()
28142    }
28143}
28144impl MessageData for STORAGE_INFORMATION_DATA {
28145    type Message = MavMessage;
28146    const ID: u32 = 261u32;
28147    const NAME: &'static str = "STORAGE_INFORMATION";
28148    const EXTRA_CRC: u8 = 179u8;
28149    const ENCODED_LEN: usize = 61usize;
28150    fn deser(
28151        _version: MavlinkVersion,
28152        __input: &[u8],
28153    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28154        let avail_len = __input.len();
28155        let mut payload_buf = [0; Self::ENCODED_LEN];
28156        let mut buf = if avail_len < Self::ENCODED_LEN {
28157            payload_buf[0..avail_len].copy_from_slice(__input);
28158            Bytes::new(&payload_buf)
28159        } else {
28160            Bytes::new(__input)
28161        };
28162        let mut __struct = Self::default();
28163        __struct.time_boot_ms = buf.get_u32_le();
28164        __struct.total_capacity = buf.get_f32_le();
28165        __struct.used_capacity = buf.get_f32_le();
28166        __struct.available_capacity = buf.get_f32_le();
28167        __struct.read_speed = buf.get_f32_le();
28168        __struct.write_speed = buf.get_f32_le();
28169        __struct.storage_id = buf.get_u8();
28170        __struct.storage_count = buf.get_u8();
28171        let tmp = buf.get_u8();
28172        __struct.status =
28173            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28174                enum_type: "StorageStatus",
28175                value: tmp as u32,
28176            })?;
28177        let tmp = buf.get_u8();
28178        __struct.mavtype =
28179            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28180                enum_type: "StorageType",
28181                value: tmp as u32,
28182            })?;
28183        for v in &mut __struct.name {
28184            let val = buf.get_u8();
28185            *v = val;
28186        }
28187        let tmp = buf.get_u8();
28188        __struct.storage_usage = StorageUsageFlag::from_bits(tmp & StorageUsageFlag::all().bits())
28189            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28190                flag_type: "StorageUsageFlag",
28191                value: tmp as u32,
28192            })?;
28193        Ok(__struct)
28194    }
28195    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28196        let mut __tmp = BytesMut::new(bytes);
28197        #[allow(clippy::absurd_extreme_comparisons)]
28198        #[allow(unused_comparisons)]
28199        if __tmp.remaining() < Self::ENCODED_LEN {
28200            panic!(
28201                "buffer is too small (need {} bytes, but got {})",
28202                Self::ENCODED_LEN,
28203                __tmp.remaining(),
28204            )
28205        }
28206        __tmp.put_u32_le(self.time_boot_ms);
28207        __tmp.put_f32_le(self.total_capacity);
28208        __tmp.put_f32_le(self.used_capacity);
28209        __tmp.put_f32_le(self.available_capacity);
28210        __tmp.put_f32_le(self.read_speed);
28211        __tmp.put_f32_le(self.write_speed);
28212        __tmp.put_u8(self.storage_id);
28213        __tmp.put_u8(self.storage_count);
28214        __tmp.put_u8(self.status as u8);
28215        __tmp.put_u8(self.mavtype as u8);
28216        for val in &self.name {
28217            __tmp.put_u8(*val);
28218        }
28219        __tmp.put_u8(self.storage_usage.bits());
28220        if matches!(version, MavlinkVersion::V2) {
28221            let len = __tmp.len();
28222            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28223        } else {
28224            __tmp.len()
28225        }
28226    }
28227}
28228#[doc = "id: 401"]
28229#[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
28230#[derive(Debug, Clone, PartialEq)]
28231#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28232#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28233pub struct SUPPORTED_TUNES_DATA {
28234    #[doc = "Bitfield of supported tune formats."]
28235    pub format: TuneFormat,
28236    #[doc = "System ID"]
28237    pub target_system: u8,
28238    #[doc = "Component ID"]
28239    pub target_component: u8,
28240}
28241impl SUPPORTED_TUNES_DATA {
28242    pub const ENCODED_LEN: usize = 6usize;
28243    pub const DEFAULT: Self = Self {
28244        format: TuneFormat::DEFAULT,
28245        target_system: 0_u8,
28246        target_component: 0_u8,
28247    };
28248    #[cfg(feature = "arbitrary")]
28249    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28250        use arbitrary::{Arbitrary, Unstructured};
28251        let mut buf = [0u8; 1024];
28252        rng.fill_bytes(&mut buf);
28253        let mut unstructured = Unstructured::new(&buf);
28254        Self::arbitrary(&mut unstructured).unwrap_or_default()
28255    }
28256}
28257impl Default for SUPPORTED_TUNES_DATA {
28258    fn default() -> Self {
28259        Self::DEFAULT.clone()
28260    }
28261}
28262impl MessageData for SUPPORTED_TUNES_DATA {
28263    type Message = MavMessage;
28264    const ID: u32 = 401u32;
28265    const NAME: &'static str = "SUPPORTED_TUNES";
28266    const EXTRA_CRC: u8 = 183u8;
28267    const ENCODED_LEN: usize = 6usize;
28268    fn deser(
28269        _version: MavlinkVersion,
28270        __input: &[u8],
28271    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28272        let avail_len = __input.len();
28273        let mut payload_buf = [0; Self::ENCODED_LEN];
28274        let mut buf = if avail_len < Self::ENCODED_LEN {
28275            payload_buf[0..avail_len].copy_from_slice(__input);
28276            Bytes::new(&payload_buf)
28277        } else {
28278            Bytes::new(__input)
28279        };
28280        let mut __struct = Self::default();
28281        let tmp = buf.get_u32_le();
28282        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
28283            ::mavlink_core::error::ParserError::InvalidEnum {
28284                enum_type: "TuneFormat",
28285                value: tmp as u32,
28286            },
28287        )?;
28288        __struct.target_system = buf.get_u8();
28289        __struct.target_component = buf.get_u8();
28290        Ok(__struct)
28291    }
28292    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28293        let mut __tmp = BytesMut::new(bytes);
28294        #[allow(clippy::absurd_extreme_comparisons)]
28295        #[allow(unused_comparisons)]
28296        if __tmp.remaining() < Self::ENCODED_LEN {
28297            panic!(
28298                "buffer is too small (need {} bytes, but got {})",
28299                Self::ENCODED_LEN,
28300                __tmp.remaining(),
28301            )
28302        }
28303        __tmp.put_u32_le(self.format as u32);
28304        __tmp.put_u8(self.target_system);
28305        __tmp.put_u8(self.target_component);
28306        if matches!(version, MavlinkVersion::V2) {
28307            let len = __tmp.len();
28308            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28309        } else {
28310            __tmp.len()
28311        }
28312    }
28313}
28314#[doc = "id: 2"]
28315#[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
28316#[derive(Debug, Clone, PartialEq)]
28317#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28318#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28319pub struct SYSTEM_TIME_DATA {
28320    #[doc = "Timestamp (UNIX epoch time)."]
28321    pub time_unix_usec: u64,
28322    #[doc = "Timestamp (time since system boot)."]
28323    pub time_boot_ms: u32,
28324}
28325impl SYSTEM_TIME_DATA {
28326    pub const ENCODED_LEN: usize = 12usize;
28327    pub const DEFAULT: Self = Self {
28328        time_unix_usec: 0_u64,
28329        time_boot_ms: 0_u32,
28330    };
28331    #[cfg(feature = "arbitrary")]
28332    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28333        use arbitrary::{Arbitrary, Unstructured};
28334        let mut buf = [0u8; 1024];
28335        rng.fill_bytes(&mut buf);
28336        let mut unstructured = Unstructured::new(&buf);
28337        Self::arbitrary(&mut unstructured).unwrap_or_default()
28338    }
28339}
28340impl Default for SYSTEM_TIME_DATA {
28341    fn default() -> Self {
28342        Self::DEFAULT.clone()
28343    }
28344}
28345impl MessageData for SYSTEM_TIME_DATA {
28346    type Message = MavMessage;
28347    const ID: u32 = 2u32;
28348    const NAME: &'static str = "SYSTEM_TIME";
28349    const EXTRA_CRC: u8 = 137u8;
28350    const ENCODED_LEN: usize = 12usize;
28351    fn deser(
28352        _version: MavlinkVersion,
28353        __input: &[u8],
28354    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28355        let avail_len = __input.len();
28356        let mut payload_buf = [0; Self::ENCODED_LEN];
28357        let mut buf = if avail_len < Self::ENCODED_LEN {
28358            payload_buf[0..avail_len].copy_from_slice(__input);
28359            Bytes::new(&payload_buf)
28360        } else {
28361            Bytes::new(__input)
28362        };
28363        let mut __struct = Self::default();
28364        __struct.time_unix_usec = buf.get_u64_le();
28365        __struct.time_boot_ms = buf.get_u32_le();
28366        Ok(__struct)
28367    }
28368    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28369        let mut __tmp = BytesMut::new(bytes);
28370        #[allow(clippy::absurd_extreme_comparisons)]
28371        #[allow(unused_comparisons)]
28372        if __tmp.remaining() < Self::ENCODED_LEN {
28373            panic!(
28374                "buffer is too small (need {} bytes, but got {})",
28375                Self::ENCODED_LEN,
28376                __tmp.remaining(),
28377            )
28378        }
28379        __tmp.put_u64_le(self.time_unix_usec);
28380        __tmp.put_u32_le(self.time_boot_ms);
28381        if matches!(version, MavlinkVersion::V2) {
28382            let len = __tmp.len();
28383            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28384        } else {
28385            __tmp.len()
28386        }
28387    }
28388}
28389#[doc = "id: 1"]
28390#[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
28391#[derive(Debug, Clone, PartialEq)]
28392#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28393#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28394pub struct SYS_STATUS_DATA {
28395    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
28396    pub onboard_control_sensors_present: MavSysStatusSensor,
28397    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
28398    pub onboard_control_sensors_enabled: MavSysStatusSensor,
28399    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
28400    pub onboard_control_sensors_health: MavSysStatusSensor,
28401    #[doc = "Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000"]
28402    pub load: u16,
28403    #[doc = "Battery voltage, UINT16_MAX: Voltage not sent by autopilot"]
28404    pub voltage_battery: u16,
28405    #[doc = "Battery current, -1: Current not sent by autopilot"]
28406    pub current_battery: i16,
28407    #[doc = "Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
28408    pub drop_rate_comm: u16,
28409    #[doc = "Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
28410    pub errors_comm: u16,
28411    #[doc = "Autopilot-specific errors"]
28412    pub errors_count1: u16,
28413    #[doc = "Autopilot-specific errors"]
28414    pub errors_count2: u16,
28415    #[doc = "Autopilot-specific errors"]
28416    pub errors_count3: u16,
28417    #[doc = "Autopilot-specific errors"]
28418    pub errors_count4: u16,
28419    #[doc = "Battery energy remaining, -1: Battery remaining energy not sent by autopilot"]
28420    pub battery_remaining: i8,
28421    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
28422    #[cfg_attr(feature = "serde", serde(default))]
28423    pub onboard_control_sensors_present_extended: MavSysStatusSensorExtended,
28424    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
28425    #[cfg_attr(feature = "serde", serde(default))]
28426    pub onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended,
28427    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
28428    #[cfg_attr(feature = "serde", serde(default))]
28429    pub onboard_control_sensors_health_extended: MavSysStatusSensorExtended,
28430}
28431impl SYS_STATUS_DATA {
28432    pub const ENCODED_LEN: usize = 43usize;
28433    pub const DEFAULT: Self = Self {
28434        onboard_control_sensors_present: MavSysStatusSensor::DEFAULT,
28435        onboard_control_sensors_enabled: MavSysStatusSensor::DEFAULT,
28436        onboard_control_sensors_health: MavSysStatusSensor::DEFAULT,
28437        load: 0_u16,
28438        voltage_battery: 0_u16,
28439        current_battery: 0_i16,
28440        drop_rate_comm: 0_u16,
28441        errors_comm: 0_u16,
28442        errors_count1: 0_u16,
28443        errors_count2: 0_u16,
28444        errors_count3: 0_u16,
28445        errors_count4: 0_u16,
28446        battery_remaining: 0_i8,
28447        onboard_control_sensors_present_extended: MavSysStatusSensorExtended::DEFAULT,
28448        onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended::DEFAULT,
28449        onboard_control_sensors_health_extended: MavSysStatusSensorExtended::DEFAULT,
28450    };
28451    #[cfg(feature = "arbitrary")]
28452    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28453        use arbitrary::{Arbitrary, Unstructured};
28454        let mut buf = [0u8; 1024];
28455        rng.fill_bytes(&mut buf);
28456        let mut unstructured = Unstructured::new(&buf);
28457        Self::arbitrary(&mut unstructured).unwrap_or_default()
28458    }
28459}
28460impl Default for SYS_STATUS_DATA {
28461    fn default() -> Self {
28462        Self::DEFAULT.clone()
28463    }
28464}
28465impl MessageData for SYS_STATUS_DATA {
28466    type Message = MavMessage;
28467    const ID: u32 = 1u32;
28468    const NAME: &'static str = "SYS_STATUS";
28469    const EXTRA_CRC: u8 = 124u8;
28470    const ENCODED_LEN: usize = 43usize;
28471    fn deser(
28472        _version: MavlinkVersion,
28473        __input: &[u8],
28474    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28475        let avail_len = __input.len();
28476        let mut payload_buf = [0; Self::ENCODED_LEN];
28477        let mut buf = if avail_len < Self::ENCODED_LEN {
28478            payload_buf[0..avail_len].copy_from_slice(__input);
28479            Bytes::new(&payload_buf)
28480        } else {
28481            Bytes::new(__input)
28482        };
28483        let mut __struct = Self::default();
28484        let tmp = buf.get_u32_le();
28485        __struct.onboard_control_sensors_present = MavSysStatusSensor::from_bits(
28486            tmp & MavSysStatusSensor::all().bits(),
28487        )
28488        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28489            flag_type: "MavSysStatusSensor",
28490            value: tmp as u32,
28491        })?;
28492        let tmp = buf.get_u32_le();
28493        __struct.onboard_control_sensors_enabled = MavSysStatusSensor::from_bits(
28494            tmp & MavSysStatusSensor::all().bits(),
28495        )
28496        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28497            flag_type: "MavSysStatusSensor",
28498            value: tmp as u32,
28499        })?;
28500        let tmp = buf.get_u32_le();
28501        __struct.onboard_control_sensors_health = MavSysStatusSensor::from_bits(
28502            tmp & MavSysStatusSensor::all().bits(),
28503        )
28504        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28505            flag_type: "MavSysStatusSensor",
28506            value: tmp as u32,
28507        })?;
28508        __struct.load = buf.get_u16_le();
28509        __struct.voltage_battery = buf.get_u16_le();
28510        __struct.current_battery = buf.get_i16_le();
28511        __struct.drop_rate_comm = buf.get_u16_le();
28512        __struct.errors_comm = buf.get_u16_le();
28513        __struct.errors_count1 = buf.get_u16_le();
28514        __struct.errors_count2 = buf.get_u16_le();
28515        __struct.errors_count3 = buf.get_u16_le();
28516        __struct.errors_count4 = buf.get_u16_le();
28517        __struct.battery_remaining = buf.get_i8();
28518        let tmp = buf.get_u32_le();
28519        __struct.onboard_control_sensors_present_extended =
28520            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
28521                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28522                flag_type: "MavSysStatusSensorExtended",
28523                value: tmp as u32,
28524            })?;
28525        let tmp = buf.get_u32_le();
28526        __struct.onboard_control_sensors_enabled_extended =
28527            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
28528                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28529                flag_type: "MavSysStatusSensorExtended",
28530                value: tmp as u32,
28531            })?;
28532        let tmp = buf.get_u32_le();
28533        __struct.onboard_control_sensors_health_extended =
28534            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
28535                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28536                flag_type: "MavSysStatusSensorExtended",
28537                value: tmp as u32,
28538            })?;
28539        Ok(__struct)
28540    }
28541    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28542        let mut __tmp = BytesMut::new(bytes);
28543        #[allow(clippy::absurd_extreme_comparisons)]
28544        #[allow(unused_comparisons)]
28545        if __tmp.remaining() < Self::ENCODED_LEN {
28546            panic!(
28547                "buffer is too small (need {} bytes, but got {})",
28548                Self::ENCODED_LEN,
28549                __tmp.remaining(),
28550            )
28551        }
28552        __tmp.put_u32_le(self.onboard_control_sensors_present.bits());
28553        __tmp.put_u32_le(self.onboard_control_sensors_enabled.bits());
28554        __tmp.put_u32_le(self.onboard_control_sensors_health.bits());
28555        __tmp.put_u16_le(self.load);
28556        __tmp.put_u16_le(self.voltage_battery);
28557        __tmp.put_i16_le(self.current_battery);
28558        __tmp.put_u16_le(self.drop_rate_comm);
28559        __tmp.put_u16_le(self.errors_comm);
28560        __tmp.put_u16_le(self.errors_count1);
28561        __tmp.put_u16_le(self.errors_count2);
28562        __tmp.put_u16_le(self.errors_count3);
28563        __tmp.put_u16_le(self.errors_count4);
28564        __tmp.put_i8(self.battery_remaining);
28565        __tmp.put_u32_le(self.onboard_control_sensors_present_extended.bits());
28566        __tmp.put_u32_le(self.onboard_control_sensors_enabled_extended.bits());
28567        __tmp.put_u32_le(self.onboard_control_sensors_health_extended.bits());
28568        if matches!(version, MavlinkVersion::V2) {
28569            let len = __tmp.len();
28570            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28571        } else {
28572            __tmp.len()
28573        }
28574    }
28575}
28576#[doc = "id: 135"]
28577#[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
28578#[derive(Debug, Clone, PartialEq)]
28579#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28580#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28581pub struct TERRAIN_CHECK_DATA {
28582    #[doc = "Latitude"]
28583    pub lat: i32,
28584    #[doc = "Longitude"]
28585    pub lon: i32,
28586}
28587impl TERRAIN_CHECK_DATA {
28588    pub const ENCODED_LEN: usize = 8usize;
28589    pub const DEFAULT: Self = Self {
28590        lat: 0_i32,
28591        lon: 0_i32,
28592    };
28593    #[cfg(feature = "arbitrary")]
28594    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28595        use arbitrary::{Arbitrary, Unstructured};
28596        let mut buf = [0u8; 1024];
28597        rng.fill_bytes(&mut buf);
28598        let mut unstructured = Unstructured::new(&buf);
28599        Self::arbitrary(&mut unstructured).unwrap_or_default()
28600    }
28601}
28602impl Default for TERRAIN_CHECK_DATA {
28603    fn default() -> Self {
28604        Self::DEFAULT.clone()
28605    }
28606}
28607impl MessageData for TERRAIN_CHECK_DATA {
28608    type Message = MavMessage;
28609    const ID: u32 = 135u32;
28610    const NAME: &'static str = "TERRAIN_CHECK";
28611    const EXTRA_CRC: u8 = 203u8;
28612    const ENCODED_LEN: usize = 8usize;
28613    fn deser(
28614        _version: MavlinkVersion,
28615        __input: &[u8],
28616    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28617        let avail_len = __input.len();
28618        let mut payload_buf = [0; Self::ENCODED_LEN];
28619        let mut buf = if avail_len < Self::ENCODED_LEN {
28620            payload_buf[0..avail_len].copy_from_slice(__input);
28621            Bytes::new(&payload_buf)
28622        } else {
28623            Bytes::new(__input)
28624        };
28625        let mut __struct = Self::default();
28626        __struct.lat = buf.get_i32_le();
28627        __struct.lon = buf.get_i32_le();
28628        Ok(__struct)
28629    }
28630    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28631        let mut __tmp = BytesMut::new(bytes);
28632        #[allow(clippy::absurd_extreme_comparisons)]
28633        #[allow(unused_comparisons)]
28634        if __tmp.remaining() < Self::ENCODED_LEN {
28635            panic!(
28636                "buffer is too small (need {} bytes, but got {})",
28637                Self::ENCODED_LEN,
28638                __tmp.remaining(),
28639            )
28640        }
28641        __tmp.put_i32_le(self.lat);
28642        __tmp.put_i32_le(self.lon);
28643        if matches!(version, MavlinkVersion::V2) {
28644            let len = __tmp.len();
28645            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28646        } else {
28647            __tmp.len()
28648        }
28649    }
28650}
28651#[doc = "id: 134"]
28652#[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
28653#[derive(Debug, Clone, PartialEq)]
28654#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28655#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28656pub struct TERRAIN_DATA_DATA {
28657    #[doc = "Latitude of SW corner of first grid"]
28658    pub lat: i32,
28659    #[doc = "Longitude of SW corner of first grid"]
28660    pub lon: i32,
28661    #[doc = "Grid spacing"]
28662    pub grid_spacing: u16,
28663    #[doc = "Terrain data MSL"]
28664    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28665    pub data: [i16; 16],
28666    #[doc = "bit within the terrain request mask"]
28667    pub gridbit: u8,
28668}
28669impl TERRAIN_DATA_DATA {
28670    pub const ENCODED_LEN: usize = 43usize;
28671    pub const DEFAULT: Self = Self {
28672        lat: 0_i32,
28673        lon: 0_i32,
28674        grid_spacing: 0_u16,
28675        data: [0_i16; 16usize],
28676        gridbit: 0_u8,
28677    };
28678    #[cfg(feature = "arbitrary")]
28679    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28680        use arbitrary::{Arbitrary, Unstructured};
28681        let mut buf = [0u8; 1024];
28682        rng.fill_bytes(&mut buf);
28683        let mut unstructured = Unstructured::new(&buf);
28684        Self::arbitrary(&mut unstructured).unwrap_or_default()
28685    }
28686}
28687impl Default for TERRAIN_DATA_DATA {
28688    fn default() -> Self {
28689        Self::DEFAULT.clone()
28690    }
28691}
28692impl MessageData for TERRAIN_DATA_DATA {
28693    type Message = MavMessage;
28694    const ID: u32 = 134u32;
28695    const NAME: &'static str = "TERRAIN_DATA";
28696    const EXTRA_CRC: u8 = 229u8;
28697    const ENCODED_LEN: usize = 43usize;
28698    fn deser(
28699        _version: MavlinkVersion,
28700        __input: &[u8],
28701    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28702        let avail_len = __input.len();
28703        let mut payload_buf = [0; Self::ENCODED_LEN];
28704        let mut buf = if avail_len < Self::ENCODED_LEN {
28705            payload_buf[0..avail_len].copy_from_slice(__input);
28706            Bytes::new(&payload_buf)
28707        } else {
28708            Bytes::new(__input)
28709        };
28710        let mut __struct = Self::default();
28711        __struct.lat = buf.get_i32_le();
28712        __struct.lon = buf.get_i32_le();
28713        __struct.grid_spacing = buf.get_u16_le();
28714        for v in &mut __struct.data {
28715            let val = buf.get_i16_le();
28716            *v = val;
28717        }
28718        __struct.gridbit = buf.get_u8();
28719        Ok(__struct)
28720    }
28721    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28722        let mut __tmp = BytesMut::new(bytes);
28723        #[allow(clippy::absurd_extreme_comparisons)]
28724        #[allow(unused_comparisons)]
28725        if __tmp.remaining() < Self::ENCODED_LEN {
28726            panic!(
28727                "buffer is too small (need {} bytes, but got {})",
28728                Self::ENCODED_LEN,
28729                __tmp.remaining(),
28730            )
28731        }
28732        __tmp.put_i32_le(self.lat);
28733        __tmp.put_i32_le(self.lon);
28734        __tmp.put_u16_le(self.grid_spacing);
28735        for val in &self.data {
28736            __tmp.put_i16_le(*val);
28737        }
28738        __tmp.put_u8(self.gridbit);
28739        if matches!(version, MavlinkVersion::V2) {
28740            let len = __tmp.len();
28741            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28742        } else {
28743            __tmp.len()
28744        }
28745    }
28746}
28747#[doc = "id: 136"]
28748#[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
28749#[derive(Debug, Clone, PartialEq)]
28750#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28751#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28752pub struct TERRAIN_REPORT_DATA {
28753    #[doc = "Latitude"]
28754    pub lat: i32,
28755    #[doc = "Longitude"]
28756    pub lon: i32,
28757    #[doc = "Terrain height MSL"]
28758    pub terrain_height: f32,
28759    #[doc = "Current vehicle height above lat/lon terrain height"]
28760    pub current_height: f32,
28761    #[doc = "grid spacing (zero if terrain at this location unavailable)"]
28762    pub spacing: u16,
28763    #[doc = "Number of 4x4 terrain blocks waiting to be received or read from disk"]
28764    pub pending: u16,
28765    #[doc = "Number of 4x4 terrain blocks in memory"]
28766    pub loaded: u16,
28767}
28768impl TERRAIN_REPORT_DATA {
28769    pub const ENCODED_LEN: usize = 22usize;
28770    pub const DEFAULT: Self = Self {
28771        lat: 0_i32,
28772        lon: 0_i32,
28773        terrain_height: 0.0_f32,
28774        current_height: 0.0_f32,
28775        spacing: 0_u16,
28776        pending: 0_u16,
28777        loaded: 0_u16,
28778    };
28779    #[cfg(feature = "arbitrary")]
28780    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28781        use arbitrary::{Arbitrary, Unstructured};
28782        let mut buf = [0u8; 1024];
28783        rng.fill_bytes(&mut buf);
28784        let mut unstructured = Unstructured::new(&buf);
28785        Self::arbitrary(&mut unstructured).unwrap_or_default()
28786    }
28787}
28788impl Default for TERRAIN_REPORT_DATA {
28789    fn default() -> Self {
28790        Self::DEFAULT.clone()
28791    }
28792}
28793impl MessageData for TERRAIN_REPORT_DATA {
28794    type Message = MavMessage;
28795    const ID: u32 = 136u32;
28796    const NAME: &'static str = "TERRAIN_REPORT";
28797    const EXTRA_CRC: u8 = 1u8;
28798    const ENCODED_LEN: usize = 22usize;
28799    fn deser(
28800        _version: MavlinkVersion,
28801        __input: &[u8],
28802    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28803        let avail_len = __input.len();
28804        let mut payload_buf = [0; Self::ENCODED_LEN];
28805        let mut buf = if avail_len < Self::ENCODED_LEN {
28806            payload_buf[0..avail_len].copy_from_slice(__input);
28807            Bytes::new(&payload_buf)
28808        } else {
28809            Bytes::new(__input)
28810        };
28811        let mut __struct = Self::default();
28812        __struct.lat = buf.get_i32_le();
28813        __struct.lon = buf.get_i32_le();
28814        __struct.terrain_height = buf.get_f32_le();
28815        __struct.current_height = buf.get_f32_le();
28816        __struct.spacing = buf.get_u16_le();
28817        __struct.pending = buf.get_u16_le();
28818        __struct.loaded = buf.get_u16_le();
28819        Ok(__struct)
28820    }
28821    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28822        let mut __tmp = BytesMut::new(bytes);
28823        #[allow(clippy::absurd_extreme_comparisons)]
28824        #[allow(unused_comparisons)]
28825        if __tmp.remaining() < Self::ENCODED_LEN {
28826            panic!(
28827                "buffer is too small (need {} bytes, but got {})",
28828                Self::ENCODED_LEN,
28829                __tmp.remaining(),
28830            )
28831        }
28832        __tmp.put_i32_le(self.lat);
28833        __tmp.put_i32_le(self.lon);
28834        __tmp.put_f32_le(self.terrain_height);
28835        __tmp.put_f32_le(self.current_height);
28836        __tmp.put_u16_le(self.spacing);
28837        __tmp.put_u16_le(self.pending);
28838        __tmp.put_u16_le(self.loaded);
28839        if matches!(version, MavlinkVersion::V2) {
28840            let len = __tmp.len();
28841            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28842        } else {
28843            __tmp.len()
28844        }
28845    }
28846}
28847#[doc = "id: 133"]
28848#[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
28849#[derive(Debug, Clone, PartialEq)]
28850#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28851#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28852pub struct TERRAIN_REQUEST_DATA {
28853    #[doc = "Bitmask of requested 4x4 grids (row major 8x7 array of grids, 56 bits)"]
28854    pub mask: u64,
28855    #[doc = "Latitude of SW corner of first grid"]
28856    pub lat: i32,
28857    #[doc = "Longitude of SW corner of first grid"]
28858    pub lon: i32,
28859    #[doc = "Grid spacing"]
28860    pub grid_spacing: u16,
28861}
28862impl TERRAIN_REQUEST_DATA {
28863    pub const ENCODED_LEN: usize = 18usize;
28864    pub const DEFAULT: Self = Self {
28865        mask: 0_u64,
28866        lat: 0_i32,
28867        lon: 0_i32,
28868        grid_spacing: 0_u16,
28869    };
28870    #[cfg(feature = "arbitrary")]
28871    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28872        use arbitrary::{Arbitrary, Unstructured};
28873        let mut buf = [0u8; 1024];
28874        rng.fill_bytes(&mut buf);
28875        let mut unstructured = Unstructured::new(&buf);
28876        Self::arbitrary(&mut unstructured).unwrap_or_default()
28877    }
28878}
28879impl Default for TERRAIN_REQUEST_DATA {
28880    fn default() -> Self {
28881        Self::DEFAULT.clone()
28882    }
28883}
28884impl MessageData for TERRAIN_REQUEST_DATA {
28885    type Message = MavMessage;
28886    const ID: u32 = 133u32;
28887    const NAME: &'static str = "TERRAIN_REQUEST";
28888    const EXTRA_CRC: u8 = 6u8;
28889    const ENCODED_LEN: usize = 18usize;
28890    fn deser(
28891        _version: MavlinkVersion,
28892        __input: &[u8],
28893    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28894        let avail_len = __input.len();
28895        let mut payload_buf = [0; Self::ENCODED_LEN];
28896        let mut buf = if avail_len < Self::ENCODED_LEN {
28897            payload_buf[0..avail_len].copy_from_slice(__input);
28898            Bytes::new(&payload_buf)
28899        } else {
28900            Bytes::new(__input)
28901        };
28902        let mut __struct = Self::default();
28903        __struct.mask = buf.get_u64_le();
28904        __struct.lat = buf.get_i32_le();
28905        __struct.lon = buf.get_i32_le();
28906        __struct.grid_spacing = buf.get_u16_le();
28907        Ok(__struct)
28908    }
28909    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28910        let mut __tmp = BytesMut::new(bytes);
28911        #[allow(clippy::absurd_extreme_comparisons)]
28912        #[allow(unused_comparisons)]
28913        if __tmp.remaining() < Self::ENCODED_LEN {
28914            panic!(
28915                "buffer is too small (need {} bytes, but got {})",
28916                Self::ENCODED_LEN,
28917                __tmp.remaining(),
28918            )
28919        }
28920        __tmp.put_u64_le(self.mask);
28921        __tmp.put_i32_le(self.lat);
28922        __tmp.put_i32_le(self.lon);
28923        __tmp.put_u16_le(self.grid_spacing);
28924        if matches!(version, MavlinkVersion::V2) {
28925            let len = __tmp.len();
28926            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28927        } else {
28928            __tmp.len()
28929        }
28930    }
28931}
28932#[doc = "id: 111"]
28933#[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
28934#[derive(Debug, Clone, PartialEq)]
28935#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28936#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28937pub struct TIMESYNC_DATA {
28938    #[doc = "Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component."]
28939    pub tc1: i64,
28940    #[doc = "Time sync timestamp 2. Timestamp of syncing component (mirrored in response)."]
28941    pub ts1: i64,
28942    #[doc = "Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component."]
28943    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28944    pub target_system: u8,
28945    #[doc = "Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component."]
28946    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28947    pub target_component: u8,
28948}
28949impl TIMESYNC_DATA {
28950    pub const ENCODED_LEN: usize = 18usize;
28951    pub const DEFAULT: Self = Self {
28952        tc1: 0_i64,
28953        ts1: 0_i64,
28954        target_system: 0_u8,
28955        target_component: 0_u8,
28956    };
28957    #[cfg(feature = "arbitrary")]
28958    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28959        use arbitrary::{Arbitrary, Unstructured};
28960        let mut buf = [0u8; 1024];
28961        rng.fill_bytes(&mut buf);
28962        let mut unstructured = Unstructured::new(&buf);
28963        Self::arbitrary(&mut unstructured).unwrap_or_default()
28964    }
28965}
28966impl Default for TIMESYNC_DATA {
28967    fn default() -> Self {
28968        Self::DEFAULT.clone()
28969    }
28970}
28971impl MessageData for TIMESYNC_DATA {
28972    type Message = MavMessage;
28973    const ID: u32 = 111u32;
28974    const NAME: &'static str = "TIMESYNC";
28975    const EXTRA_CRC: u8 = 34u8;
28976    const ENCODED_LEN: usize = 18usize;
28977    fn deser(
28978        _version: MavlinkVersion,
28979        __input: &[u8],
28980    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28981        let avail_len = __input.len();
28982        let mut payload_buf = [0; Self::ENCODED_LEN];
28983        let mut buf = if avail_len < Self::ENCODED_LEN {
28984            payload_buf[0..avail_len].copy_from_slice(__input);
28985            Bytes::new(&payload_buf)
28986        } else {
28987            Bytes::new(__input)
28988        };
28989        let mut __struct = Self::default();
28990        __struct.tc1 = buf.get_i64_le();
28991        __struct.ts1 = buf.get_i64_le();
28992        __struct.target_system = buf.get_u8();
28993        __struct.target_component = buf.get_u8();
28994        Ok(__struct)
28995    }
28996    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28997        let mut __tmp = BytesMut::new(bytes);
28998        #[allow(clippy::absurd_extreme_comparisons)]
28999        #[allow(unused_comparisons)]
29000        if __tmp.remaining() < Self::ENCODED_LEN {
29001            panic!(
29002                "buffer is too small (need {} bytes, but got {})",
29003                Self::ENCODED_LEN,
29004                __tmp.remaining(),
29005            )
29006        }
29007        __tmp.put_i64_le(self.tc1);
29008        __tmp.put_i64_le(self.ts1);
29009        __tmp.put_u8(self.target_system);
29010        __tmp.put_u8(self.target_component);
29011        if matches!(version, MavlinkVersion::V2) {
29012            let len = __tmp.len();
29013            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29014        } else {
29015            __tmp.len()
29016        }
29017    }
29018}
29019#[doc = "id: 380"]
29020#[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
29021#[derive(Debug, Clone, PartialEq)]
29022#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29023#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29024pub struct TIME_ESTIMATE_TO_TARGET_DATA {
29025    #[doc = "Estimated time to complete the vehicle's configured \"safe return\" action from its current position (e.g. RTL, Smart RTL, etc.). -1 indicates that the vehicle is landed, or that no time estimate available."]
29026    pub safe_return: i32,
29027    #[doc = "Estimated time for vehicle to complete the LAND action from its current position. -1 indicates that the vehicle is landed, or that no time estimate available."]
29028    pub land: i32,
29029    #[doc = "Estimated time for reaching/completing the currently active mission item. -1 means no time estimate available."]
29030    pub mission_next_item: i32,
29031    #[doc = "Estimated time for completing the current mission. -1 means no mission active and/or no estimate available."]
29032    pub mission_end: i32,
29033    #[doc = "Estimated time for completing the current commanded action (i.e. Go To, Takeoff, Land, etc.). -1 means no action active and/or no estimate available."]
29034    pub commanded_action: i32,
29035}
29036impl TIME_ESTIMATE_TO_TARGET_DATA {
29037    pub const ENCODED_LEN: usize = 20usize;
29038    pub const DEFAULT: Self = Self {
29039        safe_return: 0_i32,
29040        land: 0_i32,
29041        mission_next_item: 0_i32,
29042        mission_end: 0_i32,
29043        commanded_action: 0_i32,
29044    };
29045    #[cfg(feature = "arbitrary")]
29046    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29047        use arbitrary::{Arbitrary, Unstructured};
29048        let mut buf = [0u8; 1024];
29049        rng.fill_bytes(&mut buf);
29050        let mut unstructured = Unstructured::new(&buf);
29051        Self::arbitrary(&mut unstructured).unwrap_or_default()
29052    }
29053}
29054impl Default for TIME_ESTIMATE_TO_TARGET_DATA {
29055    fn default() -> Self {
29056        Self::DEFAULT.clone()
29057    }
29058}
29059impl MessageData for TIME_ESTIMATE_TO_TARGET_DATA {
29060    type Message = MavMessage;
29061    const ID: u32 = 380u32;
29062    const NAME: &'static str = "TIME_ESTIMATE_TO_TARGET";
29063    const EXTRA_CRC: u8 = 232u8;
29064    const ENCODED_LEN: usize = 20usize;
29065    fn deser(
29066        _version: MavlinkVersion,
29067        __input: &[u8],
29068    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29069        let avail_len = __input.len();
29070        let mut payload_buf = [0; Self::ENCODED_LEN];
29071        let mut buf = if avail_len < Self::ENCODED_LEN {
29072            payload_buf[0..avail_len].copy_from_slice(__input);
29073            Bytes::new(&payload_buf)
29074        } else {
29075            Bytes::new(__input)
29076        };
29077        let mut __struct = Self::default();
29078        __struct.safe_return = buf.get_i32_le();
29079        __struct.land = buf.get_i32_le();
29080        __struct.mission_next_item = buf.get_i32_le();
29081        __struct.mission_end = buf.get_i32_le();
29082        __struct.commanded_action = buf.get_i32_le();
29083        Ok(__struct)
29084    }
29085    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29086        let mut __tmp = BytesMut::new(bytes);
29087        #[allow(clippy::absurd_extreme_comparisons)]
29088        #[allow(unused_comparisons)]
29089        if __tmp.remaining() < Self::ENCODED_LEN {
29090            panic!(
29091                "buffer is too small (need {} bytes, but got {})",
29092                Self::ENCODED_LEN,
29093                __tmp.remaining(),
29094            )
29095        }
29096        __tmp.put_i32_le(self.safe_return);
29097        __tmp.put_i32_le(self.land);
29098        __tmp.put_i32_le(self.mission_next_item);
29099        __tmp.put_i32_le(self.mission_end);
29100        __tmp.put_i32_le(self.commanded_action);
29101        if matches!(version, MavlinkVersion::V2) {
29102            let len = __tmp.len();
29103            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29104        } else {
29105            __tmp.len()
29106        }
29107    }
29108}
29109#[doc = "id: 333"]
29110#[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
29111#[derive(Debug, Clone, PartialEq)]
29112#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29113#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29114pub struct TRAJECTORY_REPRESENTATION_BEZIER_DATA {
29115    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29116    pub time_usec: u64,
29117    #[doc = "X-coordinate of bezier control points. Set to NaN if not being used"]
29118    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29119    pub pos_x: [f32; 5],
29120    #[doc = "Y-coordinate of bezier control points. Set to NaN if not being used"]
29121    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29122    pub pos_y: [f32; 5],
29123    #[doc = "Z-coordinate of bezier control points. Set to NaN if not being used"]
29124    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29125    pub pos_z: [f32; 5],
29126    #[doc = "Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated"]
29127    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29128    pub delta: [f32; 5],
29129    #[doc = "Yaw. Set to NaN for unchanged"]
29130    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29131    pub pos_yaw: [f32; 5],
29132    #[doc = "Number of valid control points (up-to 5 points are possible)"]
29133    pub valid_points: u8,
29134}
29135impl TRAJECTORY_REPRESENTATION_BEZIER_DATA {
29136    pub const ENCODED_LEN: usize = 109usize;
29137    pub const DEFAULT: Self = Self {
29138        time_usec: 0_u64,
29139        pos_x: [0.0_f32; 5usize],
29140        pos_y: [0.0_f32; 5usize],
29141        pos_z: [0.0_f32; 5usize],
29142        delta: [0.0_f32; 5usize],
29143        pos_yaw: [0.0_f32; 5usize],
29144        valid_points: 0_u8,
29145    };
29146    #[cfg(feature = "arbitrary")]
29147    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29148        use arbitrary::{Arbitrary, Unstructured};
29149        let mut buf = [0u8; 1024];
29150        rng.fill_bytes(&mut buf);
29151        let mut unstructured = Unstructured::new(&buf);
29152        Self::arbitrary(&mut unstructured).unwrap_or_default()
29153    }
29154}
29155impl Default for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
29156    fn default() -> Self {
29157        Self::DEFAULT.clone()
29158    }
29159}
29160impl MessageData for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
29161    type Message = MavMessage;
29162    const ID: u32 = 333u32;
29163    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_BEZIER";
29164    const EXTRA_CRC: u8 = 231u8;
29165    const ENCODED_LEN: usize = 109usize;
29166    fn deser(
29167        _version: MavlinkVersion,
29168        __input: &[u8],
29169    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29170        let avail_len = __input.len();
29171        let mut payload_buf = [0; Self::ENCODED_LEN];
29172        let mut buf = if avail_len < Self::ENCODED_LEN {
29173            payload_buf[0..avail_len].copy_from_slice(__input);
29174            Bytes::new(&payload_buf)
29175        } else {
29176            Bytes::new(__input)
29177        };
29178        let mut __struct = Self::default();
29179        __struct.time_usec = buf.get_u64_le();
29180        for v in &mut __struct.pos_x {
29181            let val = buf.get_f32_le();
29182            *v = val;
29183        }
29184        for v in &mut __struct.pos_y {
29185            let val = buf.get_f32_le();
29186            *v = val;
29187        }
29188        for v in &mut __struct.pos_z {
29189            let val = buf.get_f32_le();
29190            *v = val;
29191        }
29192        for v in &mut __struct.delta {
29193            let val = buf.get_f32_le();
29194            *v = val;
29195        }
29196        for v in &mut __struct.pos_yaw {
29197            let val = buf.get_f32_le();
29198            *v = val;
29199        }
29200        __struct.valid_points = buf.get_u8();
29201        Ok(__struct)
29202    }
29203    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29204        let mut __tmp = BytesMut::new(bytes);
29205        #[allow(clippy::absurd_extreme_comparisons)]
29206        #[allow(unused_comparisons)]
29207        if __tmp.remaining() < Self::ENCODED_LEN {
29208            panic!(
29209                "buffer is too small (need {} bytes, but got {})",
29210                Self::ENCODED_LEN,
29211                __tmp.remaining(),
29212            )
29213        }
29214        __tmp.put_u64_le(self.time_usec);
29215        for val in &self.pos_x {
29216            __tmp.put_f32_le(*val);
29217        }
29218        for val in &self.pos_y {
29219            __tmp.put_f32_le(*val);
29220        }
29221        for val in &self.pos_z {
29222            __tmp.put_f32_le(*val);
29223        }
29224        for val in &self.delta {
29225            __tmp.put_f32_le(*val);
29226        }
29227        for val in &self.pos_yaw {
29228            __tmp.put_f32_le(*val);
29229        }
29230        __tmp.put_u8(self.valid_points);
29231        if matches!(version, MavlinkVersion::V2) {
29232            let len = __tmp.len();
29233            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29234        } else {
29235            __tmp.len()
29236        }
29237    }
29238}
29239#[doc = "id: 332"]
29240#[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
29241#[derive(Debug, Clone, PartialEq)]
29242#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29243#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29244pub struct TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
29245    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29246    pub time_usec: u64,
29247    #[doc = "X-coordinate of waypoint, set to NaN if not being used"]
29248    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29249    pub pos_x: [f32; 5],
29250    #[doc = "Y-coordinate of waypoint, set to NaN if not being used"]
29251    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29252    pub pos_y: [f32; 5],
29253    #[doc = "Z-coordinate of waypoint, set to NaN if not being used"]
29254    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29255    pub pos_z: [f32; 5],
29256    #[doc = "X-velocity of waypoint, set to NaN if not being used"]
29257    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29258    pub vel_x: [f32; 5],
29259    #[doc = "Y-velocity of waypoint, set to NaN if not being used"]
29260    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29261    pub vel_y: [f32; 5],
29262    #[doc = "Z-velocity of waypoint, set to NaN if not being used"]
29263    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29264    pub vel_z: [f32; 5],
29265    #[doc = "X-acceleration of waypoint, set to NaN if not being used"]
29266    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29267    pub acc_x: [f32; 5],
29268    #[doc = "Y-acceleration of waypoint, set to NaN if not being used"]
29269    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29270    pub acc_y: [f32; 5],
29271    #[doc = "Z-acceleration of waypoint, set to NaN if not being used"]
29272    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29273    pub acc_z: [f32; 5],
29274    #[doc = "Yaw angle, set to NaN if not being used"]
29275    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29276    pub pos_yaw: [f32; 5],
29277    #[doc = "Yaw rate, set to NaN if not being used"]
29278    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29279    pub vel_yaw: [f32; 5],
29280    #[doc = "MAV_CMD command id of waypoint, set to UINT16_MAX if not being used."]
29281    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29282    pub command: [u16; 5],
29283    #[doc = "Number of valid points (up-to 5 waypoints are possible)"]
29284    pub valid_points: u8,
29285}
29286impl TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
29287    pub const ENCODED_LEN: usize = 239usize;
29288    pub const DEFAULT: Self = Self {
29289        time_usec: 0_u64,
29290        pos_x: [0.0_f32; 5usize],
29291        pos_y: [0.0_f32; 5usize],
29292        pos_z: [0.0_f32; 5usize],
29293        vel_x: [0.0_f32; 5usize],
29294        vel_y: [0.0_f32; 5usize],
29295        vel_z: [0.0_f32; 5usize],
29296        acc_x: [0.0_f32; 5usize],
29297        acc_y: [0.0_f32; 5usize],
29298        acc_z: [0.0_f32; 5usize],
29299        pos_yaw: [0.0_f32; 5usize],
29300        vel_yaw: [0.0_f32; 5usize],
29301        command: [0_u16; 5usize],
29302        valid_points: 0_u8,
29303    };
29304    #[cfg(feature = "arbitrary")]
29305    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29306        use arbitrary::{Arbitrary, Unstructured};
29307        let mut buf = [0u8; 1024];
29308        rng.fill_bytes(&mut buf);
29309        let mut unstructured = Unstructured::new(&buf);
29310        Self::arbitrary(&mut unstructured).unwrap_or_default()
29311    }
29312}
29313impl Default for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
29314    fn default() -> Self {
29315        Self::DEFAULT.clone()
29316    }
29317}
29318impl MessageData for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
29319    type Message = MavMessage;
29320    const ID: u32 = 332u32;
29321    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_WAYPOINTS";
29322    const EXTRA_CRC: u8 = 236u8;
29323    const ENCODED_LEN: usize = 239usize;
29324    fn deser(
29325        _version: MavlinkVersion,
29326        __input: &[u8],
29327    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29328        let avail_len = __input.len();
29329        let mut payload_buf = [0; Self::ENCODED_LEN];
29330        let mut buf = if avail_len < Self::ENCODED_LEN {
29331            payload_buf[0..avail_len].copy_from_slice(__input);
29332            Bytes::new(&payload_buf)
29333        } else {
29334            Bytes::new(__input)
29335        };
29336        let mut __struct = Self::default();
29337        __struct.time_usec = buf.get_u64_le();
29338        for v in &mut __struct.pos_x {
29339            let val = buf.get_f32_le();
29340            *v = val;
29341        }
29342        for v in &mut __struct.pos_y {
29343            let val = buf.get_f32_le();
29344            *v = val;
29345        }
29346        for v in &mut __struct.pos_z {
29347            let val = buf.get_f32_le();
29348            *v = val;
29349        }
29350        for v in &mut __struct.vel_x {
29351            let val = buf.get_f32_le();
29352            *v = val;
29353        }
29354        for v in &mut __struct.vel_y {
29355            let val = buf.get_f32_le();
29356            *v = val;
29357        }
29358        for v in &mut __struct.vel_z {
29359            let val = buf.get_f32_le();
29360            *v = val;
29361        }
29362        for v in &mut __struct.acc_x {
29363            let val = buf.get_f32_le();
29364            *v = val;
29365        }
29366        for v in &mut __struct.acc_y {
29367            let val = buf.get_f32_le();
29368            *v = val;
29369        }
29370        for v in &mut __struct.acc_z {
29371            let val = buf.get_f32_le();
29372            *v = val;
29373        }
29374        for v in &mut __struct.pos_yaw {
29375            let val = buf.get_f32_le();
29376            *v = val;
29377        }
29378        for v in &mut __struct.vel_yaw {
29379            let val = buf.get_f32_le();
29380            *v = val;
29381        }
29382        for v in &mut __struct.command {
29383            let val = buf.get_u16_le();
29384            *v = val;
29385        }
29386        __struct.valid_points = buf.get_u8();
29387        Ok(__struct)
29388    }
29389    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29390        let mut __tmp = BytesMut::new(bytes);
29391        #[allow(clippy::absurd_extreme_comparisons)]
29392        #[allow(unused_comparisons)]
29393        if __tmp.remaining() < Self::ENCODED_LEN {
29394            panic!(
29395                "buffer is too small (need {} bytes, but got {})",
29396                Self::ENCODED_LEN,
29397                __tmp.remaining(),
29398            )
29399        }
29400        __tmp.put_u64_le(self.time_usec);
29401        for val in &self.pos_x {
29402            __tmp.put_f32_le(*val);
29403        }
29404        for val in &self.pos_y {
29405            __tmp.put_f32_le(*val);
29406        }
29407        for val in &self.pos_z {
29408            __tmp.put_f32_le(*val);
29409        }
29410        for val in &self.vel_x {
29411            __tmp.put_f32_le(*val);
29412        }
29413        for val in &self.vel_y {
29414            __tmp.put_f32_le(*val);
29415        }
29416        for val in &self.vel_z {
29417            __tmp.put_f32_le(*val);
29418        }
29419        for val in &self.acc_x {
29420            __tmp.put_f32_le(*val);
29421        }
29422        for val in &self.acc_y {
29423            __tmp.put_f32_le(*val);
29424        }
29425        for val in &self.acc_z {
29426            __tmp.put_f32_le(*val);
29427        }
29428        for val in &self.pos_yaw {
29429            __tmp.put_f32_le(*val);
29430        }
29431        for val in &self.vel_yaw {
29432            __tmp.put_f32_le(*val);
29433        }
29434        for val in &self.command {
29435            __tmp.put_u16_le(*val);
29436        }
29437        __tmp.put_u8(self.valid_points);
29438        if matches!(version, MavlinkVersion::V2) {
29439            let len = __tmp.len();
29440            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29441        } else {
29442            __tmp.len()
29443        }
29444    }
29445}
29446#[doc = "id: 385"]
29447#[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
29448#[derive(Debug, Clone, PartialEq)]
29449#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29450#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29451pub struct TUNNEL_DATA {
29452    #[doc = "A code that identifies the content of the payload (0 for unknown, which is the default). If this code is less than 32768, it is a 'registered' payload type and the corresponding code should be added to the MAV_TUNNEL_PAYLOAD_TYPE enum. Software creators can register blocks of types as needed. Codes greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
29453    pub payload_type: MavTunnelPayloadType,
29454    #[doc = "System ID (can be 0 for broadcast, but this is discouraged)"]
29455    pub target_system: u8,
29456    #[doc = "Component ID (can be 0 for broadcast, but this is discouraged)"]
29457    pub target_component: u8,
29458    #[doc = "Length of the data transported in payload"]
29459    pub payload_length: u8,
29460    #[doc = "Variable length payload. The payload length is defined by payload_length. The entire content of this block is opaque unless you understand the encoding specified by payload_type."]
29461    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29462    pub payload: [u8; 128],
29463}
29464impl TUNNEL_DATA {
29465    pub const ENCODED_LEN: usize = 133usize;
29466    pub const DEFAULT: Self = Self {
29467        payload_type: MavTunnelPayloadType::DEFAULT,
29468        target_system: 0_u8,
29469        target_component: 0_u8,
29470        payload_length: 0_u8,
29471        payload: [0_u8; 128usize],
29472    };
29473    #[cfg(feature = "arbitrary")]
29474    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29475        use arbitrary::{Arbitrary, Unstructured};
29476        let mut buf = [0u8; 1024];
29477        rng.fill_bytes(&mut buf);
29478        let mut unstructured = Unstructured::new(&buf);
29479        Self::arbitrary(&mut unstructured).unwrap_or_default()
29480    }
29481}
29482impl Default for TUNNEL_DATA {
29483    fn default() -> Self {
29484        Self::DEFAULT.clone()
29485    }
29486}
29487impl MessageData for TUNNEL_DATA {
29488    type Message = MavMessage;
29489    const ID: u32 = 385u32;
29490    const NAME: &'static str = "TUNNEL";
29491    const EXTRA_CRC: u8 = 147u8;
29492    const ENCODED_LEN: usize = 133usize;
29493    fn deser(
29494        _version: MavlinkVersion,
29495        __input: &[u8],
29496    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29497        let avail_len = __input.len();
29498        let mut payload_buf = [0; Self::ENCODED_LEN];
29499        let mut buf = if avail_len < Self::ENCODED_LEN {
29500            payload_buf[0..avail_len].copy_from_slice(__input);
29501            Bytes::new(&payload_buf)
29502        } else {
29503            Bytes::new(__input)
29504        };
29505        let mut __struct = Self::default();
29506        let tmp = buf.get_u16_le();
29507        __struct.payload_type = FromPrimitive::from_u16(tmp).ok_or(
29508            ::mavlink_core::error::ParserError::InvalidEnum {
29509                enum_type: "MavTunnelPayloadType",
29510                value: tmp as u32,
29511            },
29512        )?;
29513        __struct.target_system = buf.get_u8();
29514        __struct.target_component = buf.get_u8();
29515        __struct.payload_length = buf.get_u8();
29516        for v in &mut __struct.payload {
29517            let val = buf.get_u8();
29518            *v = val;
29519        }
29520        Ok(__struct)
29521    }
29522    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29523        let mut __tmp = BytesMut::new(bytes);
29524        #[allow(clippy::absurd_extreme_comparisons)]
29525        #[allow(unused_comparisons)]
29526        if __tmp.remaining() < Self::ENCODED_LEN {
29527            panic!(
29528                "buffer is too small (need {} bytes, but got {})",
29529                Self::ENCODED_LEN,
29530                __tmp.remaining(),
29531            )
29532        }
29533        __tmp.put_u16_le(self.payload_type as u16);
29534        __tmp.put_u8(self.target_system);
29535        __tmp.put_u8(self.target_component);
29536        __tmp.put_u8(self.payload_length);
29537        for val in &self.payload {
29538            __tmp.put_u8(*val);
29539        }
29540        if matches!(version, MavlinkVersion::V2) {
29541            let len = __tmp.len();
29542            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29543        } else {
29544            __tmp.len()
29545        }
29546    }
29547}
29548#[doc = "id: 222"]
29549#[doc = "System status specific to ualberta uav."]
29550#[derive(Debug, Clone, PartialEq)]
29551#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29552#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29553pub struct UALBERTA_SYS_STATUS_DATA {
29554    #[doc = "System mode, see UALBERTA_AUTOPILOT_MODE ENUM"]
29555    pub mode: u8,
29556    #[doc = "Navigation mode, see UALBERTA_NAV_MODE ENUM"]
29557    pub nav_mode: u8,
29558    #[doc = "Pilot mode, see UALBERTA_PILOT_MODE"]
29559    pub pilot: u8,
29560}
29561impl UALBERTA_SYS_STATUS_DATA {
29562    pub const ENCODED_LEN: usize = 3usize;
29563    pub const DEFAULT: Self = Self {
29564        mode: 0_u8,
29565        nav_mode: 0_u8,
29566        pilot: 0_u8,
29567    };
29568    #[cfg(feature = "arbitrary")]
29569    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29570        use arbitrary::{Arbitrary, Unstructured};
29571        let mut buf = [0u8; 1024];
29572        rng.fill_bytes(&mut buf);
29573        let mut unstructured = Unstructured::new(&buf);
29574        Self::arbitrary(&mut unstructured).unwrap_or_default()
29575    }
29576}
29577impl Default for UALBERTA_SYS_STATUS_DATA {
29578    fn default() -> Self {
29579        Self::DEFAULT.clone()
29580    }
29581}
29582impl MessageData for UALBERTA_SYS_STATUS_DATA {
29583    type Message = MavMessage;
29584    const ID: u32 = 222u32;
29585    const NAME: &'static str = "UALBERTA_SYS_STATUS";
29586    const EXTRA_CRC: u8 = 15u8;
29587    const ENCODED_LEN: usize = 3usize;
29588    fn deser(
29589        _version: MavlinkVersion,
29590        __input: &[u8],
29591    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29592        let avail_len = __input.len();
29593        let mut payload_buf = [0; Self::ENCODED_LEN];
29594        let mut buf = if avail_len < Self::ENCODED_LEN {
29595            payload_buf[0..avail_len].copy_from_slice(__input);
29596            Bytes::new(&payload_buf)
29597        } else {
29598            Bytes::new(__input)
29599        };
29600        let mut __struct = Self::default();
29601        __struct.mode = buf.get_u8();
29602        __struct.nav_mode = buf.get_u8();
29603        __struct.pilot = buf.get_u8();
29604        Ok(__struct)
29605    }
29606    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29607        let mut __tmp = BytesMut::new(bytes);
29608        #[allow(clippy::absurd_extreme_comparisons)]
29609        #[allow(unused_comparisons)]
29610        if __tmp.remaining() < Self::ENCODED_LEN {
29611            panic!(
29612                "buffer is too small (need {} bytes, but got {})",
29613                Self::ENCODED_LEN,
29614                __tmp.remaining(),
29615            )
29616        }
29617        __tmp.put_u8(self.mode);
29618        __tmp.put_u8(self.nav_mode);
29619        __tmp.put_u8(self.pilot);
29620        if matches!(version, MavlinkVersion::V2) {
29621            let len = __tmp.len();
29622            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29623        } else {
29624            __tmp.len()
29625        }
29626    }
29627}
29628#[doc = "id: 311"]
29629#[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
29630#[derive(Debug, Clone, PartialEq)]
29631#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29632#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29633pub struct UAVCAN_NODE_INFO_DATA {
29634    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29635    pub time_usec: u64,
29636    #[doc = "Time since the start-up of the node."]
29637    pub uptime_sec: u32,
29638    #[doc = "Version control system (VCS) revision identifier (e.g. git short commit hash). 0 if unknown."]
29639    pub sw_vcs_commit: u32,
29640    #[doc = "Node name string. For example, \"sapog.px4.io\"."]
29641    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29642    pub name: [u8; 80],
29643    #[doc = "Hardware major version number."]
29644    pub hw_version_major: u8,
29645    #[doc = "Hardware minor version number."]
29646    pub hw_version_minor: u8,
29647    #[doc = "Hardware unique 128-bit ID."]
29648    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29649    pub hw_unique_id: [u8; 16],
29650    #[doc = "Software major version number."]
29651    pub sw_version_major: u8,
29652    #[doc = "Software minor version number."]
29653    pub sw_version_minor: u8,
29654}
29655impl UAVCAN_NODE_INFO_DATA {
29656    pub const ENCODED_LEN: usize = 116usize;
29657    pub const DEFAULT: Self = Self {
29658        time_usec: 0_u64,
29659        uptime_sec: 0_u32,
29660        sw_vcs_commit: 0_u32,
29661        name: [0_u8; 80usize],
29662        hw_version_major: 0_u8,
29663        hw_version_minor: 0_u8,
29664        hw_unique_id: [0_u8; 16usize],
29665        sw_version_major: 0_u8,
29666        sw_version_minor: 0_u8,
29667    };
29668    #[cfg(feature = "arbitrary")]
29669    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29670        use arbitrary::{Arbitrary, Unstructured};
29671        let mut buf = [0u8; 1024];
29672        rng.fill_bytes(&mut buf);
29673        let mut unstructured = Unstructured::new(&buf);
29674        Self::arbitrary(&mut unstructured).unwrap_or_default()
29675    }
29676}
29677impl Default for UAVCAN_NODE_INFO_DATA {
29678    fn default() -> Self {
29679        Self::DEFAULT.clone()
29680    }
29681}
29682impl MessageData for UAVCAN_NODE_INFO_DATA {
29683    type Message = MavMessage;
29684    const ID: u32 = 311u32;
29685    const NAME: &'static str = "UAVCAN_NODE_INFO";
29686    const EXTRA_CRC: u8 = 95u8;
29687    const ENCODED_LEN: usize = 116usize;
29688    fn deser(
29689        _version: MavlinkVersion,
29690        __input: &[u8],
29691    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29692        let avail_len = __input.len();
29693        let mut payload_buf = [0; Self::ENCODED_LEN];
29694        let mut buf = if avail_len < Self::ENCODED_LEN {
29695            payload_buf[0..avail_len].copy_from_slice(__input);
29696            Bytes::new(&payload_buf)
29697        } else {
29698            Bytes::new(__input)
29699        };
29700        let mut __struct = Self::default();
29701        __struct.time_usec = buf.get_u64_le();
29702        __struct.uptime_sec = buf.get_u32_le();
29703        __struct.sw_vcs_commit = buf.get_u32_le();
29704        for v in &mut __struct.name {
29705            let val = buf.get_u8();
29706            *v = val;
29707        }
29708        __struct.hw_version_major = buf.get_u8();
29709        __struct.hw_version_minor = buf.get_u8();
29710        for v in &mut __struct.hw_unique_id {
29711            let val = buf.get_u8();
29712            *v = val;
29713        }
29714        __struct.sw_version_major = buf.get_u8();
29715        __struct.sw_version_minor = buf.get_u8();
29716        Ok(__struct)
29717    }
29718    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29719        let mut __tmp = BytesMut::new(bytes);
29720        #[allow(clippy::absurd_extreme_comparisons)]
29721        #[allow(unused_comparisons)]
29722        if __tmp.remaining() < Self::ENCODED_LEN {
29723            panic!(
29724                "buffer is too small (need {} bytes, but got {})",
29725                Self::ENCODED_LEN,
29726                __tmp.remaining(),
29727            )
29728        }
29729        __tmp.put_u64_le(self.time_usec);
29730        __tmp.put_u32_le(self.uptime_sec);
29731        __tmp.put_u32_le(self.sw_vcs_commit);
29732        for val in &self.name {
29733            __tmp.put_u8(*val);
29734        }
29735        __tmp.put_u8(self.hw_version_major);
29736        __tmp.put_u8(self.hw_version_minor);
29737        for val in &self.hw_unique_id {
29738            __tmp.put_u8(*val);
29739        }
29740        __tmp.put_u8(self.sw_version_major);
29741        __tmp.put_u8(self.sw_version_minor);
29742        if matches!(version, MavlinkVersion::V2) {
29743            let len = __tmp.len();
29744            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29745        } else {
29746            __tmp.len()
29747        }
29748    }
29749}
29750#[doc = "id: 310"]
29751#[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
29752#[derive(Debug, Clone, PartialEq)]
29753#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29754#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29755pub struct UAVCAN_NODE_STATUS_DATA {
29756    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29757    pub time_usec: u64,
29758    #[doc = "Time since the start-up of the node."]
29759    pub uptime_sec: u32,
29760    #[doc = "Vendor-specific status information."]
29761    pub vendor_specific_status_code: u16,
29762    #[doc = "Generalized node health status."]
29763    pub health: UavcanNodeHealth,
29764    #[doc = "Generalized operating mode."]
29765    pub mode: UavcanNodeMode,
29766    #[doc = "Not used currently."]
29767    pub sub_mode: u8,
29768}
29769impl UAVCAN_NODE_STATUS_DATA {
29770    pub const ENCODED_LEN: usize = 17usize;
29771    pub const DEFAULT: Self = Self {
29772        time_usec: 0_u64,
29773        uptime_sec: 0_u32,
29774        vendor_specific_status_code: 0_u16,
29775        health: UavcanNodeHealth::DEFAULT,
29776        mode: UavcanNodeMode::DEFAULT,
29777        sub_mode: 0_u8,
29778    };
29779    #[cfg(feature = "arbitrary")]
29780    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29781        use arbitrary::{Arbitrary, Unstructured};
29782        let mut buf = [0u8; 1024];
29783        rng.fill_bytes(&mut buf);
29784        let mut unstructured = Unstructured::new(&buf);
29785        Self::arbitrary(&mut unstructured).unwrap_or_default()
29786    }
29787}
29788impl Default for UAVCAN_NODE_STATUS_DATA {
29789    fn default() -> Self {
29790        Self::DEFAULT.clone()
29791    }
29792}
29793impl MessageData for UAVCAN_NODE_STATUS_DATA {
29794    type Message = MavMessage;
29795    const ID: u32 = 310u32;
29796    const NAME: &'static str = "UAVCAN_NODE_STATUS";
29797    const EXTRA_CRC: u8 = 28u8;
29798    const ENCODED_LEN: usize = 17usize;
29799    fn deser(
29800        _version: MavlinkVersion,
29801        __input: &[u8],
29802    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29803        let avail_len = __input.len();
29804        let mut payload_buf = [0; Self::ENCODED_LEN];
29805        let mut buf = if avail_len < Self::ENCODED_LEN {
29806            payload_buf[0..avail_len].copy_from_slice(__input);
29807            Bytes::new(&payload_buf)
29808        } else {
29809            Bytes::new(__input)
29810        };
29811        let mut __struct = Self::default();
29812        __struct.time_usec = buf.get_u64_le();
29813        __struct.uptime_sec = buf.get_u32_le();
29814        __struct.vendor_specific_status_code = buf.get_u16_le();
29815        let tmp = buf.get_u8();
29816        __struct.health =
29817            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29818                enum_type: "UavcanNodeHealth",
29819                value: tmp as u32,
29820            })?;
29821        let tmp = buf.get_u8();
29822        __struct.mode =
29823            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29824                enum_type: "UavcanNodeMode",
29825                value: tmp as u32,
29826            })?;
29827        __struct.sub_mode = buf.get_u8();
29828        Ok(__struct)
29829    }
29830    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29831        let mut __tmp = BytesMut::new(bytes);
29832        #[allow(clippy::absurd_extreme_comparisons)]
29833        #[allow(unused_comparisons)]
29834        if __tmp.remaining() < Self::ENCODED_LEN {
29835            panic!(
29836                "buffer is too small (need {} bytes, but got {})",
29837                Self::ENCODED_LEN,
29838                __tmp.remaining(),
29839            )
29840        }
29841        __tmp.put_u64_le(self.time_usec);
29842        __tmp.put_u32_le(self.uptime_sec);
29843        __tmp.put_u16_le(self.vendor_specific_status_code);
29844        __tmp.put_u8(self.health as u8);
29845        __tmp.put_u8(self.mode as u8);
29846        __tmp.put_u8(self.sub_mode);
29847        if matches!(version, MavlinkVersion::V2) {
29848            let len = __tmp.len();
29849            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29850        } else {
29851            __tmp.len()
29852        }
29853    }
29854}
29855#[doc = "id: 340"]
29856#[doc = "The global position resulting from GPS and sensor fusion."]
29857#[derive(Debug, Clone, PartialEq)]
29858#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29859#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29860pub struct UTM_GLOBAL_POSITION_DATA {
29861    #[doc = "Time of applicability of position (microseconds since UNIX epoch)."]
29862    pub time: u64,
29863    #[doc = "Latitude (WGS84)"]
29864    pub lat: i32,
29865    #[doc = "Longitude (WGS84)"]
29866    pub lon: i32,
29867    #[doc = "Altitude (WGS84)"]
29868    pub alt: i32,
29869    #[doc = "Altitude above ground"]
29870    pub relative_alt: i32,
29871    #[doc = "Next waypoint, latitude (WGS84)"]
29872    pub next_lat: i32,
29873    #[doc = "Next waypoint, longitude (WGS84)"]
29874    pub next_lon: i32,
29875    #[doc = "Next waypoint, altitude (WGS84)"]
29876    pub next_alt: i32,
29877    #[doc = "Ground X speed (latitude, positive north)"]
29878    pub vx: i16,
29879    #[doc = "Ground Y speed (longitude, positive east)"]
29880    pub vy: i16,
29881    #[doc = "Ground Z speed (altitude, positive down)"]
29882    pub vz: i16,
29883    #[doc = "Horizontal position uncertainty (standard deviation)"]
29884    pub h_acc: u16,
29885    #[doc = "Altitude uncertainty (standard deviation)"]
29886    pub v_acc: u16,
29887    #[doc = "Speed uncertainty (standard deviation)"]
29888    pub vel_acc: u16,
29889    #[doc = "Time until next update. Set to 0 if unknown or in data driven mode."]
29890    pub update_rate: u16,
29891    #[doc = "Unique UAS ID."]
29892    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29893    pub uas_id: [u8; 18],
29894    #[doc = "Flight state"]
29895    pub flight_state: UtmFlightState,
29896    #[doc = "Bitwise OR combination of the data available flags."]
29897    pub flags: UtmDataAvailFlags,
29898}
29899impl UTM_GLOBAL_POSITION_DATA {
29900    pub const ENCODED_LEN: usize = 70usize;
29901    pub const DEFAULT: Self = Self {
29902        time: 0_u64,
29903        lat: 0_i32,
29904        lon: 0_i32,
29905        alt: 0_i32,
29906        relative_alt: 0_i32,
29907        next_lat: 0_i32,
29908        next_lon: 0_i32,
29909        next_alt: 0_i32,
29910        vx: 0_i16,
29911        vy: 0_i16,
29912        vz: 0_i16,
29913        h_acc: 0_u16,
29914        v_acc: 0_u16,
29915        vel_acc: 0_u16,
29916        update_rate: 0_u16,
29917        uas_id: [0_u8; 18usize],
29918        flight_state: UtmFlightState::DEFAULT,
29919        flags: UtmDataAvailFlags::DEFAULT,
29920    };
29921    #[cfg(feature = "arbitrary")]
29922    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29923        use arbitrary::{Arbitrary, Unstructured};
29924        let mut buf = [0u8; 1024];
29925        rng.fill_bytes(&mut buf);
29926        let mut unstructured = Unstructured::new(&buf);
29927        Self::arbitrary(&mut unstructured).unwrap_or_default()
29928    }
29929}
29930impl Default for UTM_GLOBAL_POSITION_DATA {
29931    fn default() -> Self {
29932        Self::DEFAULT.clone()
29933    }
29934}
29935impl MessageData for UTM_GLOBAL_POSITION_DATA {
29936    type Message = MavMessage;
29937    const ID: u32 = 340u32;
29938    const NAME: &'static str = "UTM_GLOBAL_POSITION";
29939    const EXTRA_CRC: u8 = 99u8;
29940    const ENCODED_LEN: usize = 70usize;
29941    fn deser(
29942        _version: MavlinkVersion,
29943        __input: &[u8],
29944    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29945        let avail_len = __input.len();
29946        let mut payload_buf = [0; Self::ENCODED_LEN];
29947        let mut buf = if avail_len < Self::ENCODED_LEN {
29948            payload_buf[0..avail_len].copy_from_slice(__input);
29949            Bytes::new(&payload_buf)
29950        } else {
29951            Bytes::new(__input)
29952        };
29953        let mut __struct = Self::default();
29954        __struct.time = buf.get_u64_le();
29955        __struct.lat = buf.get_i32_le();
29956        __struct.lon = buf.get_i32_le();
29957        __struct.alt = buf.get_i32_le();
29958        __struct.relative_alt = buf.get_i32_le();
29959        __struct.next_lat = buf.get_i32_le();
29960        __struct.next_lon = buf.get_i32_le();
29961        __struct.next_alt = buf.get_i32_le();
29962        __struct.vx = buf.get_i16_le();
29963        __struct.vy = buf.get_i16_le();
29964        __struct.vz = buf.get_i16_le();
29965        __struct.h_acc = buf.get_u16_le();
29966        __struct.v_acc = buf.get_u16_le();
29967        __struct.vel_acc = buf.get_u16_le();
29968        __struct.update_rate = buf.get_u16_le();
29969        for v in &mut __struct.uas_id {
29970            let val = buf.get_u8();
29971            *v = val;
29972        }
29973        let tmp = buf.get_u8();
29974        __struct.flight_state =
29975            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29976                enum_type: "UtmFlightState",
29977                value: tmp as u32,
29978            })?;
29979        let tmp = buf.get_u8();
29980        __struct.flags = UtmDataAvailFlags::from_bits(tmp & UtmDataAvailFlags::all().bits())
29981            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29982                flag_type: "UtmDataAvailFlags",
29983                value: tmp as u32,
29984            })?;
29985        Ok(__struct)
29986    }
29987    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29988        let mut __tmp = BytesMut::new(bytes);
29989        #[allow(clippy::absurd_extreme_comparisons)]
29990        #[allow(unused_comparisons)]
29991        if __tmp.remaining() < Self::ENCODED_LEN {
29992            panic!(
29993                "buffer is too small (need {} bytes, but got {})",
29994                Self::ENCODED_LEN,
29995                __tmp.remaining(),
29996            )
29997        }
29998        __tmp.put_u64_le(self.time);
29999        __tmp.put_i32_le(self.lat);
30000        __tmp.put_i32_le(self.lon);
30001        __tmp.put_i32_le(self.alt);
30002        __tmp.put_i32_le(self.relative_alt);
30003        __tmp.put_i32_le(self.next_lat);
30004        __tmp.put_i32_le(self.next_lon);
30005        __tmp.put_i32_le(self.next_alt);
30006        __tmp.put_i16_le(self.vx);
30007        __tmp.put_i16_le(self.vy);
30008        __tmp.put_i16_le(self.vz);
30009        __tmp.put_u16_le(self.h_acc);
30010        __tmp.put_u16_le(self.v_acc);
30011        __tmp.put_u16_le(self.vel_acc);
30012        __tmp.put_u16_le(self.update_rate);
30013        for val in &self.uas_id {
30014            __tmp.put_u8(*val);
30015        }
30016        __tmp.put_u8(self.flight_state as u8);
30017        __tmp.put_u8(self.flags.bits());
30018        if matches!(version, MavlinkVersion::V2) {
30019            let len = __tmp.len();
30020            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30021        } else {
30022            __tmp.len()
30023        }
30024    }
30025}
30026#[doc = "id: 248"]
30027#[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
30028#[derive(Debug, Clone, PartialEq)]
30029#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30030#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30031pub struct V2_EXTENSION_DATA {
30032    #[doc = "A code that identifies the software component that understands this message (analogous to USB device classes or mime type strings). If this code is less than 32768, it is considered a 'registered' protocol extension and the corresponding entry should be added to <https://github.com/mavlink/mavlink/definition_files/extension_message_ids.xml>. Software creators can register blocks of message IDs as needed (useful for GCS specific metadata, etc...). Message_types greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
30033    pub message_type: u16,
30034    #[doc = "Network ID (0 for broadcast)"]
30035    pub target_network: u8,
30036    #[doc = "System ID (0 for broadcast)"]
30037    pub target_system: u8,
30038    #[doc = "Component ID (0 for broadcast)"]
30039    pub target_component: u8,
30040    #[doc = "Variable length payload. The length must be encoded in the payload as part of the message_type protocol, e.g. by including the length as payload data, or by terminating the payload data with a non-zero marker. This is required in order to reconstruct zero-terminated payloads that are (or otherwise would be) trimmed by MAVLink 2 empty-byte truncation. The entire content of the payload block is opaque unless you understand the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the MAVLink specification."]
30041    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30042    pub payload: [u8; 249],
30043}
30044impl V2_EXTENSION_DATA {
30045    pub const ENCODED_LEN: usize = 254usize;
30046    pub const DEFAULT: Self = Self {
30047        message_type: 0_u16,
30048        target_network: 0_u8,
30049        target_system: 0_u8,
30050        target_component: 0_u8,
30051        payload: [0_u8; 249usize],
30052    };
30053    #[cfg(feature = "arbitrary")]
30054    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30055        use arbitrary::{Arbitrary, Unstructured};
30056        let mut buf = [0u8; 1024];
30057        rng.fill_bytes(&mut buf);
30058        let mut unstructured = Unstructured::new(&buf);
30059        Self::arbitrary(&mut unstructured).unwrap_or_default()
30060    }
30061}
30062impl Default for V2_EXTENSION_DATA {
30063    fn default() -> Self {
30064        Self::DEFAULT.clone()
30065    }
30066}
30067impl MessageData for V2_EXTENSION_DATA {
30068    type Message = MavMessage;
30069    const ID: u32 = 248u32;
30070    const NAME: &'static str = "V2_EXTENSION";
30071    const EXTRA_CRC: u8 = 8u8;
30072    const ENCODED_LEN: usize = 254usize;
30073    fn deser(
30074        _version: MavlinkVersion,
30075        __input: &[u8],
30076    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30077        let avail_len = __input.len();
30078        let mut payload_buf = [0; Self::ENCODED_LEN];
30079        let mut buf = if avail_len < Self::ENCODED_LEN {
30080            payload_buf[0..avail_len].copy_from_slice(__input);
30081            Bytes::new(&payload_buf)
30082        } else {
30083            Bytes::new(__input)
30084        };
30085        let mut __struct = Self::default();
30086        __struct.message_type = buf.get_u16_le();
30087        __struct.target_network = buf.get_u8();
30088        __struct.target_system = buf.get_u8();
30089        __struct.target_component = buf.get_u8();
30090        for v in &mut __struct.payload {
30091            let val = buf.get_u8();
30092            *v = val;
30093        }
30094        Ok(__struct)
30095    }
30096    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30097        let mut __tmp = BytesMut::new(bytes);
30098        #[allow(clippy::absurd_extreme_comparisons)]
30099        #[allow(unused_comparisons)]
30100        if __tmp.remaining() < Self::ENCODED_LEN {
30101            panic!(
30102                "buffer is too small (need {} bytes, but got {})",
30103                Self::ENCODED_LEN,
30104                __tmp.remaining(),
30105            )
30106        }
30107        __tmp.put_u16_le(self.message_type);
30108        __tmp.put_u8(self.target_network);
30109        __tmp.put_u8(self.target_system);
30110        __tmp.put_u8(self.target_component);
30111        for val in &self.payload {
30112            __tmp.put_u8(*val);
30113        }
30114        if matches!(version, MavlinkVersion::V2) {
30115            let len = __tmp.len();
30116            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30117        } else {
30118            __tmp.len()
30119        }
30120    }
30121}
30122#[doc = "id: 74"]
30123#[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
30124#[derive(Debug, Clone, PartialEq)]
30125#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30126#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30127pub struct VFR_HUD_DATA {
30128    #[doc = "Vehicle speed in form appropriate for vehicle type. For standard aircraft this is typically calibrated airspeed (CAS) or indicated airspeed (IAS) - either of which can be used by a pilot to estimate stall speed."]
30129    pub airspeed: f32,
30130    #[doc = "Current ground speed."]
30131    pub groundspeed: f32,
30132    #[doc = "Current altitude (MSL)."]
30133    pub alt: f32,
30134    #[doc = "Current climb rate."]
30135    pub climb: f32,
30136    #[doc = "Current heading in compass units (0-360, 0=north)."]
30137    pub heading: i16,
30138    #[doc = "Current throttle setting (0 to 100)."]
30139    pub throttle: u16,
30140}
30141impl VFR_HUD_DATA {
30142    pub const ENCODED_LEN: usize = 20usize;
30143    pub const DEFAULT: Self = Self {
30144        airspeed: 0.0_f32,
30145        groundspeed: 0.0_f32,
30146        alt: 0.0_f32,
30147        climb: 0.0_f32,
30148        heading: 0_i16,
30149        throttle: 0_u16,
30150    };
30151    #[cfg(feature = "arbitrary")]
30152    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30153        use arbitrary::{Arbitrary, Unstructured};
30154        let mut buf = [0u8; 1024];
30155        rng.fill_bytes(&mut buf);
30156        let mut unstructured = Unstructured::new(&buf);
30157        Self::arbitrary(&mut unstructured).unwrap_or_default()
30158    }
30159}
30160impl Default for VFR_HUD_DATA {
30161    fn default() -> Self {
30162        Self::DEFAULT.clone()
30163    }
30164}
30165impl MessageData for VFR_HUD_DATA {
30166    type Message = MavMessage;
30167    const ID: u32 = 74u32;
30168    const NAME: &'static str = "VFR_HUD";
30169    const EXTRA_CRC: u8 = 20u8;
30170    const ENCODED_LEN: usize = 20usize;
30171    fn deser(
30172        _version: MavlinkVersion,
30173        __input: &[u8],
30174    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30175        let avail_len = __input.len();
30176        let mut payload_buf = [0; Self::ENCODED_LEN];
30177        let mut buf = if avail_len < Self::ENCODED_LEN {
30178            payload_buf[0..avail_len].copy_from_slice(__input);
30179            Bytes::new(&payload_buf)
30180        } else {
30181            Bytes::new(__input)
30182        };
30183        let mut __struct = Self::default();
30184        __struct.airspeed = buf.get_f32_le();
30185        __struct.groundspeed = buf.get_f32_le();
30186        __struct.alt = buf.get_f32_le();
30187        __struct.climb = buf.get_f32_le();
30188        __struct.heading = buf.get_i16_le();
30189        __struct.throttle = buf.get_u16_le();
30190        Ok(__struct)
30191    }
30192    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30193        let mut __tmp = BytesMut::new(bytes);
30194        #[allow(clippy::absurd_extreme_comparisons)]
30195        #[allow(unused_comparisons)]
30196        if __tmp.remaining() < Self::ENCODED_LEN {
30197            panic!(
30198                "buffer is too small (need {} bytes, but got {})",
30199                Self::ENCODED_LEN,
30200                __tmp.remaining(),
30201            )
30202        }
30203        __tmp.put_f32_le(self.airspeed);
30204        __tmp.put_f32_le(self.groundspeed);
30205        __tmp.put_f32_le(self.alt);
30206        __tmp.put_f32_le(self.climb);
30207        __tmp.put_i16_le(self.heading);
30208        __tmp.put_u16_le(self.throttle);
30209        if matches!(version, MavlinkVersion::V2) {
30210            let len = __tmp.len();
30211            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30212        } else {
30213            __tmp.len()
30214        }
30215    }
30216}
30217#[doc = "id: 241"]
30218#[doc = "Vibration levels and accelerometer clipping."]
30219#[derive(Debug, Clone, PartialEq)]
30220#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30221#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30222pub struct VIBRATION_DATA {
30223    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30224    pub time_usec: u64,
30225    #[doc = "Vibration levels on X-axis"]
30226    pub vibration_x: f32,
30227    #[doc = "Vibration levels on Y-axis"]
30228    pub vibration_y: f32,
30229    #[doc = "Vibration levels on Z-axis"]
30230    pub vibration_z: f32,
30231    #[doc = "first accelerometer clipping count"]
30232    pub clipping_0: u32,
30233    #[doc = "second accelerometer clipping count"]
30234    pub clipping_1: u32,
30235    #[doc = "third accelerometer clipping count"]
30236    pub clipping_2: u32,
30237}
30238impl VIBRATION_DATA {
30239    pub const ENCODED_LEN: usize = 32usize;
30240    pub const DEFAULT: Self = Self {
30241        time_usec: 0_u64,
30242        vibration_x: 0.0_f32,
30243        vibration_y: 0.0_f32,
30244        vibration_z: 0.0_f32,
30245        clipping_0: 0_u32,
30246        clipping_1: 0_u32,
30247        clipping_2: 0_u32,
30248    };
30249    #[cfg(feature = "arbitrary")]
30250    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30251        use arbitrary::{Arbitrary, Unstructured};
30252        let mut buf = [0u8; 1024];
30253        rng.fill_bytes(&mut buf);
30254        let mut unstructured = Unstructured::new(&buf);
30255        Self::arbitrary(&mut unstructured).unwrap_or_default()
30256    }
30257}
30258impl Default for VIBRATION_DATA {
30259    fn default() -> Self {
30260        Self::DEFAULT.clone()
30261    }
30262}
30263impl MessageData for VIBRATION_DATA {
30264    type Message = MavMessage;
30265    const ID: u32 = 241u32;
30266    const NAME: &'static str = "VIBRATION";
30267    const EXTRA_CRC: u8 = 90u8;
30268    const ENCODED_LEN: usize = 32usize;
30269    fn deser(
30270        _version: MavlinkVersion,
30271        __input: &[u8],
30272    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30273        let avail_len = __input.len();
30274        let mut payload_buf = [0; Self::ENCODED_LEN];
30275        let mut buf = if avail_len < Self::ENCODED_LEN {
30276            payload_buf[0..avail_len].copy_from_slice(__input);
30277            Bytes::new(&payload_buf)
30278        } else {
30279            Bytes::new(__input)
30280        };
30281        let mut __struct = Self::default();
30282        __struct.time_usec = buf.get_u64_le();
30283        __struct.vibration_x = buf.get_f32_le();
30284        __struct.vibration_y = buf.get_f32_le();
30285        __struct.vibration_z = buf.get_f32_le();
30286        __struct.clipping_0 = buf.get_u32_le();
30287        __struct.clipping_1 = buf.get_u32_le();
30288        __struct.clipping_2 = buf.get_u32_le();
30289        Ok(__struct)
30290    }
30291    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30292        let mut __tmp = BytesMut::new(bytes);
30293        #[allow(clippy::absurd_extreme_comparisons)]
30294        #[allow(unused_comparisons)]
30295        if __tmp.remaining() < Self::ENCODED_LEN {
30296            panic!(
30297                "buffer is too small (need {} bytes, but got {})",
30298                Self::ENCODED_LEN,
30299                __tmp.remaining(),
30300            )
30301        }
30302        __tmp.put_u64_le(self.time_usec);
30303        __tmp.put_f32_le(self.vibration_x);
30304        __tmp.put_f32_le(self.vibration_y);
30305        __tmp.put_f32_le(self.vibration_z);
30306        __tmp.put_u32_le(self.clipping_0);
30307        __tmp.put_u32_le(self.clipping_1);
30308        __tmp.put_u32_le(self.clipping_2);
30309        if matches!(version, MavlinkVersion::V2) {
30310            let len = __tmp.len();
30311            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30312        } else {
30313            __tmp.len()
30314        }
30315    }
30316}
30317#[doc = "id: 104"]
30318#[doc = "Global position estimate from a Vicon motion system source."]
30319#[derive(Debug, Clone, PartialEq)]
30320#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30321#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30322pub struct VICON_POSITION_ESTIMATE_DATA {
30323    #[doc = "Timestamp (UNIX time or time since system boot)"]
30324    pub usec: u64,
30325    #[doc = "Global X position"]
30326    pub x: f32,
30327    #[doc = "Global Y position"]
30328    pub y: f32,
30329    #[doc = "Global Z position"]
30330    pub z: f32,
30331    #[doc = "Roll angle"]
30332    pub roll: f32,
30333    #[doc = "Pitch angle"]
30334    pub pitch: f32,
30335    #[doc = "Yaw angle"]
30336    pub yaw: f32,
30337    #[doc = "Row-major representation of 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
30338    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30339    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30340    pub covariance: [f32; 21],
30341}
30342impl VICON_POSITION_ESTIMATE_DATA {
30343    pub const ENCODED_LEN: usize = 116usize;
30344    pub const DEFAULT: Self = Self {
30345        usec: 0_u64,
30346        x: 0.0_f32,
30347        y: 0.0_f32,
30348        z: 0.0_f32,
30349        roll: 0.0_f32,
30350        pitch: 0.0_f32,
30351        yaw: 0.0_f32,
30352        covariance: [0.0_f32; 21usize],
30353    };
30354    #[cfg(feature = "arbitrary")]
30355    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30356        use arbitrary::{Arbitrary, Unstructured};
30357        let mut buf = [0u8; 1024];
30358        rng.fill_bytes(&mut buf);
30359        let mut unstructured = Unstructured::new(&buf);
30360        Self::arbitrary(&mut unstructured).unwrap_or_default()
30361    }
30362}
30363impl Default for VICON_POSITION_ESTIMATE_DATA {
30364    fn default() -> Self {
30365        Self::DEFAULT.clone()
30366    }
30367}
30368impl MessageData for VICON_POSITION_ESTIMATE_DATA {
30369    type Message = MavMessage;
30370    const ID: u32 = 104u32;
30371    const NAME: &'static str = "VICON_POSITION_ESTIMATE";
30372    const EXTRA_CRC: u8 = 56u8;
30373    const ENCODED_LEN: usize = 116usize;
30374    fn deser(
30375        _version: MavlinkVersion,
30376        __input: &[u8],
30377    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30378        let avail_len = __input.len();
30379        let mut payload_buf = [0; Self::ENCODED_LEN];
30380        let mut buf = if avail_len < Self::ENCODED_LEN {
30381            payload_buf[0..avail_len].copy_from_slice(__input);
30382            Bytes::new(&payload_buf)
30383        } else {
30384            Bytes::new(__input)
30385        };
30386        let mut __struct = Self::default();
30387        __struct.usec = buf.get_u64_le();
30388        __struct.x = buf.get_f32_le();
30389        __struct.y = buf.get_f32_le();
30390        __struct.z = buf.get_f32_le();
30391        __struct.roll = buf.get_f32_le();
30392        __struct.pitch = buf.get_f32_le();
30393        __struct.yaw = buf.get_f32_le();
30394        for v in &mut __struct.covariance {
30395            let val = buf.get_f32_le();
30396            *v = val;
30397        }
30398        Ok(__struct)
30399    }
30400    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30401        let mut __tmp = BytesMut::new(bytes);
30402        #[allow(clippy::absurd_extreme_comparisons)]
30403        #[allow(unused_comparisons)]
30404        if __tmp.remaining() < Self::ENCODED_LEN {
30405            panic!(
30406                "buffer is too small (need {} bytes, but got {})",
30407                Self::ENCODED_LEN,
30408                __tmp.remaining(),
30409            )
30410        }
30411        __tmp.put_u64_le(self.usec);
30412        __tmp.put_f32_le(self.x);
30413        __tmp.put_f32_le(self.y);
30414        __tmp.put_f32_le(self.z);
30415        __tmp.put_f32_le(self.roll);
30416        __tmp.put_f32_le(self.pitch);
30417        __tmp.put_f32_le(self.yaw);
30418        for val in &self.covariance {
30419            __tmp.put_f32_le(*val);
30420        }
30421        if matches!(version, MavlinkVersion::V2) {
30422            let len = __tmp.len();
30423            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30424        } else {
30425            __tmp.len()
30426        }
30427    }
30428}
30429#[doc = "id: 269"]
30430#[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
30431#[derive(Debug, Clone, PartialEq)]
30432#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30433#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30434pub struct VIDEO_STREAM_INFORMATION_DATA {
30435    #[doc = "Frame rate."]
30436    pub framerate: f32,
30437    #[doc = "Bit rate."]
30438    pub bitrate: u32,
30439    #[doc = "Bitmap of stream status flags."]
30440    pub flags: VideoStreamStatusFlags,
30441    #[doc = "Horizontal resolution."]
30442    pub resolution_h: u16,
30443    #[doc = "Vertical resolution."]
30444    pub resolution_v: u16,
30445    #[doc = "Video image rotation clockwise."]
30446    pub rotation: u16,
30447    #[doc = "Horizontal Field of view."]
30448    pub hfov: u16,
30449    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
30450    pub stream_id: u8,
30451    #[doc = "Number of streams available."]
30452    pub count: u8,
30453    #[doc = "Type of stream."]
30454    pub mavtype: VideoStreamType,
30455    #[doc = "Stream name."]
30456    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30457    pub name: [u8; 32],
30458    #[doc = "Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to)."]
30459    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30460    pub uri: [u8; 160],
30461    #[doc = "Encoding of stream."]
30462    #[cfg_attr(feature = "serde", serde(default))]
30463    pub encoding: VideoStreamEncoding,
30464    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
30465    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30466    pub camera_device_id: u8,
30467}
30468impl VIDEO_STREAM_INFORMATION_DATA {
30469    pub const ENCODED_LEN: usize = 215usize;
30470    pub const DEFAULT: Self = Self {
30471        framerate: 0.0_f32,
30472        bitrate: 0_u32,
30473        flags: VideoStreamStatusFlags::DEFAULT,
30474        resolution_h: 0_u16,
30475        resolution_v: 0_u16,
30476        rotation: 0_u16,
30477        hfov: 0_u16,
30478        stream_id: 0_u8,
30479        count: 0_u8,
30480        mavtype: VideoStreamType::DEFAULT,
30481        name: [0_u8; 32usize],
30482        uri: [0_u8; 160usize],
30483        encoding: VideoStreamEncoding::DEFAULT,
30484        camera_device_id: 0_u8,
30485    };
30486    #[cfg(feature = "arbitrary")]
30487    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30488        use arbitrary::{Arbitrary, Unstructured};
30489        let mut buf = [0u8; 1024];
30490        rng.fill_bytes(&mut buf);
30491        let mut unstructured = Unstructured::new(&buf);
30492        Self::arbitrary(&mut unstructured).unwrap_or_default()
30493    }
30494}
30495impl Default for VIDEO_STREAM_INFORMATION_DATA {
30496    fn default() -> Self {
30497        Self::DEFAULT.clone()
30498    }
30499}
30500impl MessageData for VIDEO_STREAM_INFORMATION_DATA {
30501    type Message = MavMessage;
30502    const ID: u32 = 269u32;
30503    const NAME: &'static str = "VIDEO_STREAM_INFORMATION";
30504    const EXTRA_CRC: u8 = 109u8;
30505    const ENCODED_LEN: usize = 215usize;
30506    fn deser(
30507        _version: MavlinkVersion,
30508        __input: &[u8],
30509    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30510        let avail_len = __input.len();
30511        let mut payload_buf = [0; Self::ENCODED_LEN];
30512        let mut buf = if avail_len < Self::ENCODED_LEN {
30513            payload_buf[0..avail_len].copy_from_slice(__input);
30514            Bytes::new(&payload_buf)
30515        } else {
30516            Bytes::new(__input)
30517        };
30518        let mut __struct = Self::default();
30519        __struct.framerate = buf.get_f32_le();
30520        __struct.bitrate = buf.get_u32_le();
30521        let tmp = buf.get_u16_le();
30522        __struct.flags = VideoStreamStatusFlags::from_bits(
30523            tmp & VideoStreamStatusFlags::all().bits(),
30524        )
30525        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30526            flag_type: "VideoStreamStatusFlags",
30527            value: tmp as u32,
30528        })?;
30529        __struct.resolution_h = buf.get_u16_le();
30530        __struct.resolution_v = buf.get_u16_le();
30531        __struct.rotation = buf.get_u16_le();
30532        __struct.hfov = buf.get_u16_le();
30533        __struct.stream_id = buf.get_u8();
30534        __struct.count = buf.get_u8();
30535        let tmp = buf.get_u8();
30536        __struct.mavtype =
30537            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30538                enum_type: "VideoStreamType",
30539                value: tmp as u32,
30540            })?;
30541        for v in &mut __struct.name {
30542            let val = buf.get_u8();
30543            *v = val;
30544        }
30545        for v in &mut __struct.uri {
30546            let val = buf.get_u8();
30547            *v = val;
30548        }
30549        let tmp = buf.get_u8();
30550        __struct.encoding =
30551            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30552                enum_type: "VideoStreamEncoding",
30553                value: tmp as u32,
30554            })?;
30555        __struct.camera_device_id = buf.get_u8();
30556        Ok(__struct)
30557    }
30558    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30559        let mut __tmp = BytesMut::new(bytes);
30560        #[allow(clippy::absurd_extreme_comparisons)]
30561        #[allow(unused_comparisons)]
30562        if __tmp.remaining() < Self::ENCODED_LEN {
30563            panic!(
30564                "buffer is too small (need {} bytes, but got {})",
30565                Self::ENCODED_LEN,
30566                __tmp.remaining(),
30567            )
30568        }
30569        __tmp.put_f32_le(self.framerate);
30570        __tmp.put_u32_le(self.bitrate);
30571        __tmp.put_u16_le(self.flags.bits());
30572        __tmp.put_u16_le(self.resolution_h);
30573        __tmp.put_u16_le(self.resolution_v);
30574        __tmp.put_u16_le(self.rotation);
30575        __tmp.put_u16_le(self.hfov);
30576        __tmp.put_u8(self.stream_id);
30577        __tmp.put_u8(self.count);
30578        __tmp.put_u8(self.mavtype as u8);
30579        for val in &self.name {
30580            __tmp.put_u8(*val);
30581        }
30582        for val in &self.uri {
30583            __tmp.put_u8(*val);
30584        }
30585        __tmp.put_u8(self.encoding as u8);
30586        __tmp.put_u8(self.camera_device_id);
30587        if matches!(version, MavlinkVersion::V2) {
30588            let len = __tmp.len();
30589            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30590        } else {
30591            __tmp.len()
30592        }
30593    }
30594}
30595#[doc = "id: 270"]
30596#[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
30597#[derive(Debug, Clone, PartialEq)]
30598#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30599#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30600pub struct VIDEO_STREAM_STATUS_DATA {
30601    #[doc = "Frame rate"]
30602    pub framerate: f32,
30603    #[doc = "Bit rate"]
30604    pub bitrate: u32,
30605    #[doc = "Bitmap of stream status flags"]
30606    pub flags: VideoStreamStatusFlags,
30607    #[doc = "Horizontal resolution"]
30608    pub resolution_h: u16,
30609    #[doc = "Vertical resolution"]
30610    pub resolution_v: u16,
30611    #[doc = "Video image rotation clockwise"]
30612    pub rotation: u16,
30613    #[doc = "Horizontal Field of view"]
30614    pub hfov: u16,
30615    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
30616    pub stream_id: u8,
30617    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
30618    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30619    pub camera_device_id: u8,
30620}
30621impl VIDEO_STREAM_STATUS_DATA {
30622    pub const ENCODED_LEN: usize = 20usize;
30623    pub const DEFAULT: Self = Self {
30624        framerate: 0.0_f32,
30625        bitrate: 0_u32,
30626        flags: VideoStreamStatusFlags::DEFAULT,
30627        resolution_h: 0_u16,
30628        resolution_v: 0_u16,
30629        rotation: 0_u16,
30630        hfov: 0_u16,
30631        stream_id: 0_u8,
30632        camera_device_id: 0_u8,
30633    };
30634    #[cfg(feature = "arbitrary")]
30635    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30636        use arbitrary::{Arbitrary, Unstructured};
30637        let mut buf = [0u8; 1024];
30638        rng.fill_bytes(&mut buf);
30639        let mut unstructured = Unstructured::new(&buf);
30640        Self::arbitrary(&mut unstructured).unwrap_or_default()
30641    }
30642}
30643impl Default for VIDEO_STREAM_STATUS_DATA {
30644    fn default() -> Self {
30645        Self::DEFAULT.clone()
30646    }
30647}
30648impl MessageData for VIDEO_STREAM_STATUS_DATA {
30649    type Message = MavMessage;
30650    const ID: u32 = 270u32;
30651    const NAME: &'static str = "VIDEO_STREAM_STATUS";
30652    const EXTRA_CRC: u8 = 59u8;
30653    const ENCODED_LEN: usize = 20usize;
30654    fn deser(
30655        _version: MavlinkVersion,
30656        __input: &[u8],
30657    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30658        let avail_len = __input.len();
30659        let mut payload_buf = [0; Self::ENCODED_LEN];
30660        let mut buf = if avail_len < Self::ENCODED_LEN {
30661            payload_buf[0..avail_len].copy_from_slice(__input);
30662            Bytes::new(&payload_buf)
30663        } else {
30664            Bytes::new(__input)
30665        };
30666        let mut __struct = Self::default();
30667        __struct.framerate = buf.get_f32_le();
30668        __struct.bitrate = buf.get_u32_le();
30669        let tmp = buf.get_u16_le();
30670        __struct.flags = VideoStreamStatusFlags::from_bits(
30671            tmp & VideoStreamStatusFlags::all().bits(),
30672        )
30673        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30674            flag_type: "VideoStreamStatusFlags",
30675            value: tmp as u32,
30676        })?;
30677        __struct.resolution_h = buf.get_u16_le();
30678        __struct.resolution_v = buf.get_u16_le();
30679        __struct.rotation = buf.get_u16_le();
30680        __struct.hfov = buf.get_u16_le();
30681        __struct.stream_id = buf.get_u8();
30682        __struct.camera_device_id = buf.get_u8();
30683        Ok(__struct)
30684    }
30685    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30686        let mut __tmp = BytesMut::new(bytes);
30687        #[allow(clippy::absurd_extreme_comparisons)]
30688        #[allow(unused_comparisons)]
30689        if __tmp.remaining() < Self::ENCODED_LEN {
30690            panic!(
30691                "buffer is too small (need {} bytes, but got {})",
30692                Self::ENCODED_LEN,
30693                __tmp.remaining(),
30694            )
30695        }
30696        __tmp.put_f32_le(self.framerate);
30697        __tmp.put_u32_le(self.bitrate);
30698        __tmp.put_u16_le(self.flags.bits());
30699        __tmp.put_u16_le(self.resolution_h);
30700        __tmp.put_u16_le(self.resolution_v);
30701        __tmp.put_u16_le(self.rotation);
30702        __tmp.put_u16_le(self.hfov);
30703        __tmp.put_u8(self.stream_id);
30704        __tmp.put_u8(self.camera_device_id);
30705        if matches!(version, MavlinkVersion::V2) {
30706            let len = __tmp.len();
30707            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30708        } else {
30709            __tmp.len()
30710        }
30711    }
30712}
30713#[doc = "id: 102"]
30714#[doc = "Local position/attitude estimate from a vision source."]
30715#[derive(Debug, Clone, PartialEq)]
30716#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30717#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30718pub struct VISION_POSITION_ESTIMATE_DATA {
30719    #[doc = "Timestamp (UNIX time or time since system boot)"]
30720    pub usec: u64,
30721    #[doc = "Local X position"]
30722    pub x: f32,
30723    #[doc = "Local Y position"]
30724    pub y: f32,
30725    #[doc = "Local Z position"]
30726    pub z: f32,
30727    #[doc = "Roll angle"]
30728    pub roll: f32,
30729    #[doc = "Pitch angle"]
30730    pub pitch: f32,
30731    #[doc = "Yaw angle"]
30732    pub yaw: f32,
30733    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
30734    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30735    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30736    pub covariance: [f32; 21],
30737    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
30738    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30739    pub reset_counter: u8,
30740}
30741impl VISION_POSITION_ESTIMATE_DATA {
30742    pub const ENCODED_LEN: usize = 117usize;
30743    pub const DEFAULT: Self = Self {
30744        usec: 0_u64,
30745        x: 0.0_f32,
30746        y: 0.0_f32,
30747        z: 0.0_f32,
30748        roll: 0.0_f32,
30749        pitch: 0.0_f32,
30750        yaw: 0.0_f32,
30751        covariance: [0.0_f32; 21usize],
30752        reset_counter: 0_u8,
30753    };
30754    #[cfg(feature = "arbitrary")]
30755    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30756        use arbitrary::{Arbitrary, Unstructured};
30757        let mut buf = [0u8; 1024];
30758        rng.fill_bytes(&mut buf);
30759        let mut unstructured = Unstructured::new(&buf);
30760        Self::arbitrary(&mut unstructured).unwrap_or_default()
30761    }
30762}
30763impl Default for VISION_POSITION_ESTIMATE_DATA {
30764    fn default() -> Self {
30765        Self::DEFAULT.clone()
30766    }
30767}
30768impl MessageData for VISION_POSITION_ESTIMATE_DATA {
30769    type Message = MavMessage;
30770    const ID: u32 = 102u32;
30771    const NAME: &'static str = "VISION_POSITION_ESTIMATE";
30772    const EXTRA_CRC: u8 = 158u8;
30773    const ENCODED_LEN: usize = 117usize;
30774    fn deser(
30775        _version: MavlinkVersion,
30776        __input: &[u8],
30777    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30778        let avail_len = __input.len();
30779        let mut payload_buf = [0; Self::ENCODED_LEN];
30780        let mut buf = if avail_len < Self::ENCODED_LEN {
30781            payload_buf[0..avail_len].copy_from_slice(__input);
30782            Bytes::new(&payload_buf)
30783        } else {
30784            Bytes::new(__input)
30785        };
30786        let mut __struct = Self::default();
30787        __struct.usec = buf.get_u64_le();
30788        __struct.x = buf.get_f32_le();
30789        __struct.y = buf.get_f32_le();
30790        __struct.z = buf.get_f32_le();
30791        __struct.roll = buf.get_f32_le();
30792        __struct.pitch = buf.get_f32_le();
30793        __struct.yaw = buf.get_f32_le();
30794        for v in &mut __struct.covariance {
30795            let val = buf.get_f32_le();
30796            *v = val;
30797        }
30798        __struct.reset_counter = buf.get_u8();
30799        Ok(__struct)
30800    }
30801    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30802        let mut __tmp = BytesMut::new(bytes);
30803        #[allow(clippy::absurd_extreme_comparisons)]
30804        #[allow(unused_comparisons)]
30805        if __tmp.remaining() < Self::ENCODED_LEN {
30806            panic!(
30807                "buffer is too small (need {} bytes, but got {})",
30808                Self::ENCODED_LEN,
30809                __tmp.remaining(),
30810            )
30811        }
30812        __tmp.put_u64_le(self.usec);
30813        __tmp.put_f32_le(self.x);
30814        __tmp.put_f32_le(self.y);
30815        __tmp.put_f32_le(self.z);
30816        __tmp.put_f32_le(self.roll);
30817        __tmp.put_f32_le(self.pitch);
30818        __tmp.put_f32_le(self.yaw);
30819        for val in &self.covariance {
30820            __tmp.put_f32_le(*val);
30821        }
30822        __tmp.put_u8(self.reset_counter);
30823        if matches!(version, MavlinkVersion::V2) {
30824            let len = __tmp.len();
30825            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30826        } else {
30827            __tmp.len()
30828        }
30829    }
30830}
30831#[doc = "id: 103"]
30832#[doc = "Speed estimate from a vision source."]
30833#[derive(Debug, Clone, PartialEq)]
30834#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30835#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30836pub struct VISION_SPEED_ESTIMATE_DATA {
30837    #[doc = "Timestamp (UNIX time or time since system boot)"]
30838    pub usec: u64,
30839    #[doc = "Global X speed"]
30840    pub x: f32,
30841    #[doc = "Global Y speed"]
30842    pub y: f32,
30843    #[doc = "Global Z speed"]
30844    pub z: f32,
30845    #[doc = "Row-major representation of 3x3 linear velocity covariance matrix (states: vx, vy, vz; 1st three entries - 1st row, etc.). If unknown, assign NaN value to first element in the array."]
30846    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30847    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30848    pub covariance: [f32; 9],
30849    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
30850    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30851    pub reset_counter: u8,
30852}
30853impl VISION_SPEED_ESTIMATE_DATA {
30854    pub const ENCODED_LEN: usize = 57usize;
30855    pub const DEFAULT: Self = Self {
30856        usec: 0_u64,
30857        x: 0.0_f32,
30858        y: 0.0_f32,
30859        z: 0.0_f32,
30860        covariance: [0.0_f32; 9usize],
30861        reset_counter: 0_u8,
30862    };
30863    #[cfg(feature = "arbitrary")]
30864    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30865        use arbitrary::{Arbitrary, Unstructured};
30866        let mut buf = [0u8; 1024];
30867        rng.fill_bytes(&mut buf);
30868        let mut unstructured = Unstructured::new(&buf);
30869        Self::arbitrary(&mut unstructured).unwrap_or_default()
30870    }
30871}
30872impl Default for VISION_SPEED_ESTIMATE_DATA {
30873    fn default() -> Self {
30874        Self::DEFAULT.clone()
30875    }
30876}
30877impl MessageData for VISION_SPEED_ESTIMATE_DATA {
30878    type Message = MavMessage;
30879    const ID: u32 = 103u32;
30880    const NAME: &'static str = "VISION_SPEED_ESTIMATE";
30881    const EXTRA_CRC: u8 = 208u8;
30882    const ENCODED_LEN: usize = 57usize;
30883    fn deser(
30884        _version: MavlinkVersion,
30885        __input: &[u8],
30886    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30887        let avail_len = __input.len();
30888        let mut payload_buf = [0; Self::ENCODED_LEN];
30889        let mut buf = if avail_len < Self::ENCODED_LEN {
30890            payload_buf[0..avail_len].copy_from_slice(__input);
30891            Bytes::new(&payload_buf)
30892        } else {
30893            Bytes::new(__input)
30894        };
30895        let mut __struct = Self::default();
30896        __struct.usec = buf.get_u64_le();
30897        __struct.x = buf.get_f32_le();
30898        __struct.y = buf.get_f32_le();
30899        __struct.z = buf.get_f32_le();
30900        for v in &mut __struct.covariance {
30901            let val = buf.get_f32_le();
30902            *v = val;
30903        }
30904        __struct.reset_counter = buf.get_u8();
30905        Ok(__struct)
30906    }
30907    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30908        let mut __tmp = BytesMut::new(bytes);
30909        #[allow(clippy::absurd_extreme_comparisons)]
30910        #[allow(unused_comparisons)]
30911        if __tmp.remaining() < Self::ENCODED_LEN {
30912            panic!(
30913                "buffer is too small (need {} bytes, but got {})",
30914                Self::ENCODED_LEN,
30915                __tmp.remaining(),
30916            )
30917        }
30918        __tmp.put_u64_le(self.usec);
30919        __tmp.put_f32_le(self.x);
30920        __tmp.put_f32_le(self.y);
30921        __tmp.put_f32_le(self.z);
30922        for val in &self.covariance {
30923            __tmp.put_f32_le(*val);
30924        }
30925        __tmp.put_u8(self.reset_counter);
30926        if matches!(version, MavlinkVersion::V2) {
30927            let len = __tmp.len();
30928            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30929        } else {
30930            __tmp.len()
30931        }
30932    }
30933}
30934#[doc = "id: 9000"]
30935#[doc = "Cumulative distance traveled for each reported wheel."]
30936#[derive(Debug, Clone, PartialEq)]
30937#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30938#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30939pub struct WHEEL_DISTANCE_DATA {
30940    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
30941    pub time_usec: u64,
30942    #[doc = "Distance reported by individual wheel encoders. Forward rotations increase values, reverse rotations decrease them. Not all wheels will necessarily have wheel encoders; the mapping of encoders to wheel positions must be agreed/understood by the endpoints."]
30943    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30944    pub distance: [f64; 16],
30945    #[doc = "Number of wheels reported."]
30946    pub count: u8,
30947}
30948impl WHEEL_DISTANCE_DATA {
30949    pub const ENCODED_LEN: usize = 137usize;
30950    pub const DEFAULT: Self = Self {
30951        time_usec: 0_u64,
30952        distance: [0.0_f64; 16usize],
30953        count: 0_u8,
30954    };
30955    #[cfg(feature = "arbitrary")]
30956    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30957        use arbitrary::{Arbitrary, Unstructured};
30958        let mut buf = [0u8; 1024];
30959        rng.fill_bytes(&mut buf);
30960        let mut unstructured = Unstructured::new(&buf);
30961        Self::arbitrary(&mut unstructured).unwrap_or_default()
30962    }
30963}
30964impl Default for WHEEL_DISTANCE_DATA {
30965    fn default() -> Self {
30966        Self::DEFAULT.clone()
30967    }
30968}
30969impl MessageData for WHEEL_DISTANCE_DATA {
30970    type Message = MavMessage;
30971    const ID: u32 = 9000u32;
30972    const NAME: &'static str = "WHEEL_DISTANCE";
30973    const EXTRA_CRC: u8 = 113u8;
30974    const ENCODED_LEN: usize = 137usize;
30975    fn deser(
30976        _version: MavlinkVersion,
30977        __input: &[u8],
30978    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30979        let avail_len = __input.len();
30980        let mut payload_buf = [0; Self::ENCODED_LEN];
30981        let mut buf = if avail_len < Self::ENCODED_LEN {
30982            payload_buf[0..avail_len].copy_from_slice(__input);
30983            Bytes::new(&payload_buf)
30984        } else {
30985            Bytes::new(__input)
30986        };
30987        let mut __struct = Self::default();
30988        __struct.time_usec = buf.get_u64_le();
30989        for v in &mut __struct.distance {
30990            let val = buf.get_f64_le();
30991            *v = val;
30992        }
30993        __struct.count = buf.get_u8();
30994        Ok(__struct)
30995    }
30996    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30997        let mut __tmp = BytesMut::new(bytes);
30998        #[allow(clippy::absurd_extreme_comparisons)]
30999        #[allow(unused_comparisons)]
31000        if __tmp.remaining() < Self::ENCODED_LEN {
31001            panic!(
31002                "buffer is too small (need {} bytes, but got {})",
31003                Self::ENCODED_LEN,
31004                __tmp.remaining(),
31005            )
31006        }
31007        __tmp.put_u64_le(self.time_usec);
31008        for val in &self.distance {
31009            __tmp.put_f64_le(*val);
31010        }
31011        __tmp.put_u8(self.count);
31012        if matches!(version, MavlinkVersion::V2) {
31013            let len = __tmp.len();
31014            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31015        } else {
31016            __tmp.len()
31017        }
31018    }
31019}
31020#[doc = "id: 299"]
31021#[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
31022#[derive(Debug, Clone, PartialEq)]
31023#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31024#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31025pub struct WIFI_CONFIG_AP_DATA {
31026    #[doc = "Name of Wi-Fi network (SSID). Blank to leave it unchanged when setting. Current SSID when sent back as a response."]
31027    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31028    pub ssid: [u8; 32],
31029    #[doc = "Password. Blank for an open AP. MD5 hash when message is sent back as a response."]
31030    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31031    pub password: [u8; 64],
31032    #[doc = "WiFi Mode."]
31033    #[cfg_attr(feature = "serde", serde(default))]
31034    pub mode: WifiConfigApMode,
31035    #[doc = "Message acceptance response (sent back to GS)."]
31036    #[cfg_attr(feature = "serde", serde(default))]
31037    pub response: WifiConfigApResponse,
31038}
31039impl WIFI_CONFIG_AP_DATA {
31040    pub const ENCODED_LEN: usize = 98usize;
31041    pub const DEFAULT: Self = Self {
31042        ssid: [0_u8; 32usize],
31043        password: [0_u8; 64usize],
31044        mode: WifiConfigApMode::DEFAULT,
31045        response: WifiConfigApResponse::DEFAULT,
31046    };
31047    #[cfg(feature = "arbitrary")]
31048    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31049        use arbitrary::{Arbitrary, Unstructured};
31050        let mut buf = [0u8; 1024];
31051        rng.fill_bytes(&mut buf);
31052        let mut unstructured = Unstructured::new(&buf);
31053        Self::arbitrary(&mut unstructured).unwrap_or_default()
31054    }
31055}
31056impl Default for WIFI_CONFIG_AP_DATA {
31057    fn default() -> Self {
31058        Self::DEFAULT.clone()
31059    }
31060}
31061impl MessageData for WIFI_CONFIG_AP_DATA {
31062    type Message = MavMessage;
31063    const ID: u32 = 299u32;
31064    const NAME: &'static str = "WIFI_CONFIG_AP";
31065    const EXTRA_CRC: u8 = 19u8;
31066    const ENCODED_LEN: usize = 98usize;
31067    fn deser(
31068        _version: MavlinkVersion,
31069        __input: &[u8],
31070    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31071        let avail_len = __input.len();
31072        let mut payload_buf = [0; Self::ENCODED_LEN];
31073        let mut buf = if avail_len < Self::ENCODED_LEN {
31074            payload_buf[0..avail_len].copy_from_slice(__input);
31075            Bytes::new(&payload_buf)
31076        } else {
31077            Bytes::new(__input)
31078        };
31079        let mut __struct = Self::default();
31080        for v in &mut __struct.ssid {
31081            let val = buf.get_u8();
31082            *v = val;
31083        }
31084        for v in &mut __struct.password {
31085            let val = buf.get_u8();
31086            *v = val;
31087        }
31088        let tmp = buf.get_i8();
31089        __struct.mode =
31090            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31091                enum_type: "WifiConfigApMode",
31092                value: tmp as u32,
31093            })?;
31094        let tmp = buf.get_i8();
31095        __struct.response =
31096            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31097                enum_type: "WifiConfigApResponse",
31098                value: tmp as u32,
31099            })?;
31100        Ok(__struct)
31101    }
31102    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31103        let mut __tmp = BytesMut::new(bytes);
31104        #[allow(clippy::absurd_extreme_comparisons)]
31105        #[allow(unused_comparisons)]
31106        if __tmp.remaining() < Self::ENCODED_LEN {
31107            panic!(
31108                "buffer is too small (need {} bytes, but got {})",
31109                Self::ENCODED_LEN,
31110                __tmp.remaining(),
31111            )
31112        }
31113        for val in &self.ssid {
31114            __tmp.put_u8(*val);
31115        }
31116        for val in &self.password {
31117            __tmp.put_u8(*val);
31118        }
31119        __tmp.put_i8(self.mode as i8);
31120        __tmp.put_i8(self.response as i8);
31121        if matches!(version, MavlinkVersion::V2) {
31122            let len = __tmp.len();
31123            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31124        } else {
31125            __tmp.len()
31126        }
31127    }
31128}
31129#[doc = "id: 9005"]
31130#[doc = "Winch status."]
31131#[derive(Debug, Clone, PartialEq)]
31132#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31133#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31134pub struct WINCH_STATUS_DATA {
31135    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
31136    pub time_usec: u64,
31137    #[doc = "Length of line released. NaN if unknown"]
31138    pub line_length: f32,
31139    #[doc = "Speed line is being released or retracted. Positive values if being released, negative values if being retracted, NaN if unknown"]
31140    pub speed: f32,
31141    #[doc = "Tension on the line. NaN if unknown"]
31142    pub tension: f32,
31143    #[doc = "Voltage of the battery supplying the winch. NaN if unknown"]
31144    pub voltage: f32,
31145    #[doc = "Current draw from the winch. NaN if unknown"]
31146    pub current: f32,
31147    #[doc = "Status flags"]
31148    pub status: MavWinchStatusFlag,
31149    #[doc = "Temperature of the motor. INT16_MAX if unknown"]
31150    pub temperature: i16,
31151}
31152impl WINCH_STATUS_DATA {
31153    pub const ENCODED_LEN: usize = 34usize;
31154    pub const DEFAULT: Self = Self {
31155        time_usec: 0_u64,
31156        line_length: 0.0_f32,
31157        speed: 0.0_f32,
31158        tension: 0.0_f32,
31159        voltage: 0.0_f32,
31160        current: 0.0_f32,
31161        status: MavWinchStatusFlag::DEFAULT,
31162        temperature: 0_i16,
31163    };
31164    #[cfg(feature = "arbitrary")]
31165    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31166        use arbitrary::{Arbitrary, Unstructured};
31167        let mut buf = [0u8; 1024];
31168        rng.fill_bytes(&mut buf);
31169        let mut unstructured = Unstructured::new(&buf);
31170        Self::arbitrary(&mut unstructured).unwrap_or_default()
31171    }
31172}
31173impl Default for WINCH_STATUS_DATA {
31174    fn default() -> Self {
31175        Self::DEFAULT.clone()
31176    }
31177}
31178impl MessageData for WINCH_STATUS_DATA {
31179    type Message = MavMessage;
31180    const ID: u32 = 9005u32;
31181    const NAME: &'static str = "WINCH_STATUS";
31182    const EXTRA_CRC: u8 = 117u8;
31183    const ENCODED_LEN: usize = 34usize;
31184    fn deser(
31185        _version: MavlinkVersion,
31186        __input: &[u8],
31187    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31188        let avail_len = __input.len();
31189        let mut payload_buf = [0; Self::ENCODED_LEN];
31190        let mut buf = if avail_len < Self::ENCODED_LEN {
31191            payload_buf[0..avail_len].copy_from_slice(__input);
31192            Bytes::new(&payload_buf)
31193        } else {
31194            Bytes::new(__input)
31195        };
31196        let mut __struct = Self::default();
31197        __struct.time_usec = buf.get_u64_le();
31198        __struct.line_length = buf.get_f32_le();
31199        __struct.speed = buf.get_f32_le();
31200        __struct.tension = buf.get_f32_le();
31201        __struct.voltage = buf.get_f32_le();
31202        __struct.current = buf.get_f32_le();
31203        let tmp = buf.get_u32_le();
31204        __struct.status = MavWinchStatusFlag::from_bits(tmp & MavWinchStatusFlag::all().bits())
31205            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31206                flag_type: "MavWinchStatusFlag",
31207                value: tmp as u32,
31208            })?;
31209        __struct.temperature = buf.get_i16_le();
31210        Ok(__struct)
31211    }
31212    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31213        let mut __tmp = BytesMut::new(bytes);
31214        #[allow(clippy::absurd_extreme_comparisons)]
31215        #[allow(unused_comparisons)]
31216        if __tmp.remaining() < Self::ENCODED_LEN {
31217            panic!(
31218                "buffer is too small (need {} bytes, but got {})",
31219                Self::ENCODED_LEN,
31220                __tmp.remaining(),
31221            )
31222        }
31223        __tmp.put_u64_le(self.time_usec);
31224        __tmp.put_f32_le(self.line_length);
31225        __tmp.put_f32_le(self.speed);
31226        __tmp.put_f32_le(self.tension);
31227        __tmp.put_f32_le(self.voltage);
31228        __tmp.put_f32_le(self.current);
31229        __tmp.put_u32_le(self.status.bits());
31230        __tmp.put_i16_le(self.temperature);
31231        if matches!(version, MavlinkVersion::V2) {
31232            let len = __tmp.len();
31233            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31234        } else {
31235            __tmp.len()
31236        }
31237    }
31238}
31239#[doc = "id: 231"]
31240#[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
31241#[derive(Debug, Clone, PartialEq)]
31242#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31243#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31244pub struct WIND_COV_DATA {
31245    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31246    pub time_usec: u64,
31247    #[doc = "Wind in North (NED) direction (NAN if unknown)"]
31248    pub wind_x: f32,
31249    #[doc = "Wind in East (NED) direction (NAN if unknown)"]
31250    pub wind_y: f32,
31251    #[doc = "Wind in down (NED) direction (NAN if unknown)"]
31252    pub wind_z: f32,
31253    #[doc = "Variability of wind in XY, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
31254    pub var_horiz: f32,
31255    #[doc = "Variability of wind in Z, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
31256    pub var_vert: f32,
31257    #[doc = "Altitude (MSL) that this measurement was taken at (NAN if unknown)"]
31258    pub wind_alt: f32,
31259    #[doc = "Horizontal speed 1-STD accuracy (0 if unknown)"]
31260    pub horiz_accuracy: f32,
31261    #[doc = "Vertical speed 1-STD accuracy (0 if unknown)"]
31262    pub vert_accuracy: f32,
31263}
31264impl WIND_COV_DATA {
31265    pub const ENCODED_LEN: usize = 40usize;
31266    pub const DEFAULT: Self = Self {
31267        time_usec: 0_u64,
31268        wind_x: 0.0_f32,
31269        wind_y: 0.0_f32,
31270        wind_z: 0.0_f32,
31271        var_horiz: 0.0_f32,
31272        var_vert: 0.0_f32,
31273        wind_alt: 0.0_f32,
31274        horiz_accuracy: 0.0_f32,
31275        vert_accuracy: 0.0_f32,
31276    };
31277    #[cfg(feature = "arbitrary")]
31278    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31279        use arbitrary::{Arbitrary, Unstructured};
31280        let mut buf = [0u8; 1024];
31281        rng.fill_bytes(&mut buf);
31282        let mut unstructured = Unstructured::new(&buf);
31283        Self::arbitrary(&mut unstructured).unwrap_or_default()
31284    }
31285}
31286impl Default for WIND_COV_DATA {
31287    fn default() -> Self {
31288        Self::DEFAULT.clone()
31289    }
31290}
31291impl MessageData for WIND_COV_DATA {
31292    type Message = MavMessage;
31293    const ID: u32 = 231u32;
31294    const NAME: &'static str = "WIND_COV";
31295    const EXTRA_CRC: u8 = 105u8;
31296    const ENCODED_LEN: usize = 40usize;
31297    fn deser(
31298        _version: MavlinkVersion,
31299        __input: &[u8],
31300    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31301        let avail_len = __input.len();
31302        let mut payload_buf = [0; Self::ENCODED_LEN];
31303        let mut buf = if avail_len < Self::ENCODED_LEN {
31304            payload_buf[0..avail_len].copy_from_slice(__input);
31305            Bytes::new(&payload_buf)
31306        } else {
31307            Bytes::new(__input)
31308        };
31309        let mut __struct = Self::default();
31310        __struct.time_usec = buf.get_u64_le();
31311        __struct.wind_x = buf.get_f32_le();
31312        __struct.wind_y = buf.get_f32_le();
31313        __struct.wind_z = buf.get_f32_le();
31314        __struct.var_horiz = buf.get_f32_le();
31315        __struct.var_vert = buf.get_f32_le();
31316        __struct.wind_alt = buf.get_f32_le();
31317        __struct.horiz_accuracy = buf.get_f32_le();
31318        __struct.vert_accuracy = buf.get_f32_le();
31319        Ok(__struct)
31320    }
31321    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31322        let mut __tmp = BytesMut::new(bytes);
31323        #[allow(clippy::absurd_extreme_comparisons)]
31324        #[allow(unused_comparisons)]
31325        if __tmp.remaining() < Self::ENCODED_LEN {
31326            panic!(
31327                "buffer is too small (need {} bytes, but got {})",
31328                Self::ENCODED_LEN,
31329                __tmp.remaining(),
31330            )
31331        }
31332        __tmp.put_u64_le(self.time_usec);
31333        __tmp.put_f32_le(self.wind_x);
31334        __tmp.put_f32_le(self.wind_y);
31335        __tmp.put_f32_le(self.wind_z);
31336        __tmp.put_f32_le(self.var_horiz);
31337        __tmp.put_f32_le(self.var_vert);
31338        __tmp.put_f32_le(self.wind_alt);
31339        __tmp.put_f32_le(self.horiz_accuracy);
31340        __tmp.put_f32_le(self.vert_accuracy);
31341        if matches!(version, MavlinkVersion::V2) {
31342            let len = __tmp.len();
31343            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31344        } else {
31345            __tmp.len()
31346        }
31347    }
31348}
31349#[derive(Clone, PartialEq, Debug)]
31350#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31351#[cfg_attr(feature = "serde", serde(tag = "type"))]
31352#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31353#[repr(u32)]
31354pub enum MavMessage {
31355    ACTUATOR_CONTROL_TARGET(ACTUATOR_CONTROL_TARGET_DATA),
31356    ACTUATOR_OUTPUT_STATUS(ACTUATOR_OUTPUT_STATUS_DATA),
31357    ADSB_VEHICLE(ADSB_VEHICLE_DATA),
31358    AIS_VESSEL(AIS_VESSEL_DATA),
31359    ALTITUDE(ALTITUDE_DATA),
31360    ATTITUDE(ATTITUDE_DATA),
31361    ATTITUDE_QUATERNION(ATTITUDE_QUATERNION_DATA),
31362    ATTITUDE_QUATERNION_COV(ATTITUDE_QUATERNION_COV_DATA),
31363    ATTITUDE_TARGET(ATTITUDE_TARGET_DATA),
31364    ATT_POS_MOCAP(ATT_POS_MOCAP_DATA),
31365    AUTH_KEY(AUTH_KEY_DATA),
31366    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA),
31367    AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA),
31368    AVAILABLE_MODES(AVAILABLE_MODES_DATA),
31369    AVAILABLE_MODES_MONITOR(AVAILABLE_MODES_MONITOR_DATA),
31370    BATTERY_INFO(BATTERY_INFO_DATA),
31371    BATTERY_STATUS(BATTERY_STATUS_DATA),
31372    BUTTON_CHANGE(BUTTON_CHANGE_DATA),
31373    CAMERA_CAPTURE_STATUS(CAMERA_CAPTURE_STATUS_DATA),
31374    CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA),
31375    CAMERA_IMAGE_CAPTURED(CAMERA_IMAGE_CAPTURED_DATA),
31376    CAMERA_INFORMATION(CAMERA_INFORMATION_DATA),
31377    CAMERA_SETTINGS(CAMERA_SETTINGS_DATA),
31378    CAMERA_THERMAL_RANGE(CAMERA_THERMAL_RANGE_DATA),
31379    CAMERA_TRACKING_GEO_STATUS(CAMERA_TRACKING_GEO_STATUS_DATA),
31380    CAMERA_TRACKING_IMAGE_STATUS(CAMERA_TRACKING_IMAGE_STATUS_DATA),
31381    CAMERA_TRIGGER(CAMERA_TRIGGER_DATA),
31382    CANFD_FRAME(CANFD_FRAME_DATA),
31383    CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA),
31384    CAN_FRAME(CAN_FRAME_DATA),
31385    CELLULAR_CONFIG(CELLULAR_CONFIG_DATA),
31386    CELLULAR_STATUS(CELLULAR_STATUS_DATA),
31387    CHANGE_OPERATOR_CONTROL(CHANGE_OPERATOR_CONTROL_DATA),
31388    CHANGE_OPERATOR_CONTROL_ACK(CHANGE_OPERATOR_CONTROL_ACK_DATA),
31389    COLLISION(COLLISION_DATA),
31390    COMMAND_ACK(COMMAND_ACK_DATA),
31391    COMMAND_CANCEL(COMMAND_CANCEL_DATA),
31392    COMMAND_INT(COMMAND_INT_DATA),
31393    COMMAND_LONG(COMMAND_LONG_DATA),
31394    #[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
31395    COMPONENT_INFORMATION(COMPONENT_INFORMATION_DATA),
31396    COMPONENT_INFORMATION_BASIC(COMPONENT_INFORMATION_BASIC_DATA),
31397    COMPONENT_METADATA(COMPONENT_METADATA_DATA),
31398    CONTROL_SYSTEM_STATE(CONTROL_SYSTEM_STATE_DATA),
31399    CURRENT_EVENT_SEQUENCE(CURRENT_EVENT_SEQUENCE_DATA),
31400    CURRENT_MODE(CURRENT_MODE_DATA),
31401    #[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
31402    DATA_STREAM(DATA_STREAM_DATA),
31403    DATA_TRANSMISSION_HANDSHAKE(DATA_TRANSMISSION_HANDSHAKE_DATA),
31404    DEBUG(DEBUG_DATA),
31405    DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA),
31406    DEBUG_VECT(DEBUG_VECT_DATA),
31407    DISTANCE_SENSOR(DISTANCE_SENSOR_DATA),
31408    EFI_STATUS(EFI_STATUS_DATA),
31409    ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA),
31410    ESC_INFO(ESC_INFO_DATA),
31411    ESC_STATUS(ESC_STATUS_DATA),
31412    ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA),
31413    EVENT(EVENT_DATA),
31414    EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA),
31415    FENCE_STATUS(FENCE_STATUS_DATA),
31416    FILE_TRANSFER_PROTOCOL(FILE_TRANSFER_PROTOCOL_DATA),
31417    FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA),
31418    FOLLOW_TARGET(FOLLOW_TARGET_DATA),
31419    FUEL_STATUS(FUEL_STATUS_DATA),
31420    GENERATOR_STATUS(GENERATOR_STATUS_DATA),
31421    GIMBAL_DEVICE_ATTITUDE_STATUS(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA),
31422    GIMBAL_DEVICE_INFORMATION(GIMBAL_DEVICE_INFORMATION_DATA),
31423    GIMBAL_DEVICE_SET_ATTITUDE(GIMBAL_DEVICE_SET_ATTITUDE_DATA),
31424    GIMBAL_MANAGER_INFORMATION(GIMBAL_MANAGER_INFORMATION_DATA),
31425    GIMBAL_MANAGER_SET_ATTITUDE(GIMBAL_MANAGER_SET_ATTITUDE_DATA),
31426    GIMBAL_MANAGER_SET_MANUAL_CONTROL(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA),
31427    GIMBAL_MANAGER_SET_PITCHYAW(GIMBAL_MANAGER_SET_PITCHYAW_DATA),
31428    GIMBAL_MANAGER_STATUS(GIMBAL_MANAGER_STATUS_DATA),
31429    GLOBAL_POSITION_INT(GLOBAL_POSITION_INT_DATA),
31430    GLOBAL_POSITION_INT_COV(GLOBAL_POSITION_INT_COV_DATA),
31431    GLOBAL_VISION_POSITION_ESTIMATE(GLOBAL_VISION_POSITION_ESTIMATE_DATA),
31432    GPS2_RAW(GPS2_RAW_DATA),
31433    GPS2_RTK(GPS2_RTK_DATA),
31434    GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA),
31435    #[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
31436    GPS_INJECT_DATA(GPS_INJECT_DATA_DATA),
31437    GPS_INPUT(GPS_INPUT_DATA),
31438    GPS_RAW_INT(GPS_RAW_INT_DATA),
31439    GPS_RTCM_DATA(GPS_RTCM_DATA_DATA),
31440    GPS_RTK(GPS_RTK_DATA),
31441    GPS_STATUS(GPS_STATUS_DATA),
31442    HEARTBEAT(HEARTBEAT_DATA),
31443    HIGHRES_IMU(HIGHRES_IMU_DATA),
31444    #[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
31445    HIGH_LATENCY(HIGH_LATENCY_DATA),
31446    HIGH_LATENCY2(HIGH_LATENCY2_DATA),
31447    HIL_ACTUATOR_CONTROLS(HIL_ACTUATOR_CONTROLS_DATA),
31448    HIL_CONTROLS(HIL_CONTROLS_DATA),
31449    HIL_GPS(HIL_GPS_DATA),
31450    HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA),
31451    HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA),
31452    HIL_SENSOR(HIL_SENSOR_DATA),
31453    #[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
31454    HIL_STATE(HIL_STATE_DATA),
31455    HIL_STATE_QUATERNION(HIL_STATE_QUATERNION_DATA),
31456    HOME_POSITION(HOME_POSITION_DATA),
31457    HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA),
31458    ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA),
31459    ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA),
31460    LANDING_TARGET(LANDING_TARGET_DATA),
31461    LINK_NODE_STATUS(LINK_NODE_STATUS_DATA),
31462    LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA),
31463    LOCAL_POSITION_NED_COV(LOCAL_POSITION_NED_COV_DATA),
31464    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA),
31465    LOGGING_ACK(LOGGING_ACK_DATA),
31466    LOGGING_DATA(LOGGING_DATA_DATA),
31467    LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA),
31468    LOG_DATA(LOG_DATA_DATA),
31469    LOG_ENTRY(LOG_ENTRY_DATA),
31470    LOG_ERASE(LOG_ERASE_DATA),
31471    LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA),
31472    LOG_REQUEST_END(LOG_REQUEST_END_DATA),
31473    LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA),
31474    MAG_CAL_REPORT(MAG_CAL_REPORT_DATA),
31475    MANUAL_CONTROL(MANUAL_CONTROL_DATA),
31476    MANUAL_SETPOINT(MANUAL_SETPOINT_DATA),
31477    MEMORY_VECT(MEMORY_VECT_DATA),
31478    MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA),
31479    MISSION_ACK(MISSION_ACK_DATA),
31480    MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA),
31481    MISSION_COUNT(MISSION_COUNT_DATA),
31482    MISSION_CURRENT(MISSION_CURRENT_DATA),
31483    #[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
31484    MISSION_ITEM(MISSION_ITEM_DATA),
31485    MISSION_ITEM_INT(MISSION_ITEM_INT_DATA),
31486    MISSION_ITEM_REACHED(MISSION_ITEM_REACHED_DATA),
31487    #[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
31488    MISSION_REQUEST(MISSION_REQUEST_DATA),
31489    MISSION_REQUEST_INT(MISSION_REQUEST_INT_DATA),
31490    MISSION_REQUEST_LIST(MISSION_REQUEST_LIST_DATA),
31491    MISSION_REQUEST_PARTIAL_LIST(MISSION_REQUEST_PARTIAL_LIST_DATA),
31492    #[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
31493    MISSION_SET_CURRENT(MISSION_SET_CURRENT_DATA),
31494    MISSION_WRITE_PARTIAL_LIST(MISSION_WRITE_PARTIAL_LIST_DATA),
31495    #[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
31496    MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA),
31497    NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA),
31498    NAMED_VALUE_INT(NAMED_VALUE_INT_DATA),
31499    NAV_CONTROLLER_OUTPUT(NAV_CONTROLLER_OUTPUT_DATA),
31500    NAV_FILTER_BIAS(NAV_FILTER_BIAS_DATA),
31501    OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA),
31502    ODOMETRY(ODOMETRY_DATA),
31503    ONBOARD_COMPUTER_STATUS(ONBOARD_COMPUTER_STATUS_DATA),
31504    OPEN_DRONE_ID_ARM_STATUS(OPEN_DRONE_ID_ARM_STATUS_DATA),
31505    OPEN_DRONE_ID_AUTHENTICATION(OPEN_DRONE_ID_AUTHENTICATION_DATA),
31506    OPEN_DRONE_ID_BASIC_ID(OPEN_DRONE_ID_BASIC_ID_DATA),
31507    OPEN_DRONE_ID_LOCATION(OPEN_DRONE_ID_LOCATION_DATA),
31508    OPEN_DRONE_ID_MESSAGE_PACK(OPEN_DRONE_ID_MESSAGE_PACK_DATA),
31509    OPEN_DRONE_ID_OPERATOR_ID(OPEN_DRONE_ID_OPERATOR_ID_DATA),
31510    OPEN_DRONE_ID_SELF_ID(OPEN_DRONE_ID_SELF_ID_DATA),
31511    OPEN_DRONE_ID_SYSTEM(OPEN_DRONE_ID_SYSTEM_DATA),
31512    OPEN_DRONE_ID_SYSTEM_UPDATE(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA),
31513    OPTICAL_FLOW(OPTICAL_FLOW_DATA),
31514    OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA),
31515    ORBIT_EXECUTION_STATUS(ORBIT_EXECUTION_STATUS_DATA),
31516    PARAM_EXT_ACK(PARAM_EXT_ACK_DATA),
31517    PARAM_EXT_REQUEST_LIST(PARAM_EXT_REQUEST_LIST_DATA),
31518    PARAM_EXT_REQUEST_READ(PARAM_EXT_REQUEST_READ_DATA),
31519    PARAM_EXT_SET(PARAM_EXT_SET_DATA),
31520    PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA),
31521    PARAM_MAP_RC(PARAM_MAP_RC_DATA),
31522    PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA),
31523    PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA),
31524    PARAM_SET(PARAM_SET_DATA),
31525    PARAM_VALUE(PARAM_VALUE_DATA),
31526    #[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
31527    PING(PING_DATA),
31528    #[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
31529    PLAY_TUNE(PLAY_TUNE_DATA),
31530    PLAY_TUNE_V2(PLAY_TUNE_V2_DATA),
31531    POSITION_TARGET_GLOBAL_INT(POSITION_TARGET_GLOBAL_INT_DATA),
31532    POSITION_TARGET_LOCAL_NED(POSITION_TARGET_LOCAL_NED_DATA),
31533    POWER_STATUS(POWER_STATUS_DATA),
31534    PROTOCOL_VERSION(PROTOCOL_VERSION_DATA),
31535    RADIO_CALIBRATION(RADIO_CALIBRATION_DATA),
31536    RADIO_STATUS(RADIO_STATUS_DATA),
31537    RAW_IMU(RAW_IMU_DATA),
31538    RAW_PRESSURE(RAW_PRESSURE_DATA),
31539    RAW_RPM(RAW_RPM_DATA),
31540    RC_CHANNELS(RC_CHANNELS_DATA),
31541    RC_CHANNELS_OVERRIDE(RC_CHANNELS_OVERRIDE_DATA),
31542    RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA),
31543    RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA),
31544    #[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
31545    REQUEST_DATA_STREAM(REQUEST_DATA_STREAM_DATA),
31546    REQUEST_EVENT(REQUEST_EVENT_DATA),
31547    RESOURCE_REQUEST(RESOURCE_REQUEST_DATA),
31548    RESPONSE_EVENT_ERROR(RESPONSE_EVENT_ERROR_DATA),
31549    SAFETY_ALLOWED_AREA(SAFETY_ALLOWED_AREA_DATA),
31550    SAFETY_SET_ALLOWED_AREA(SAFETY_SET_ALLOWED_AREA_DATA),
31551    SCALED_IMU(SCALED_IMU_DATA),
31552    SCALED_IMU2(SCALED_IMU2_DATA),
31553    SCALED_IMU3(SCALED_IMU3_DATA),
31554    SCALED_PRESSURE(SCALED_PRESSURE_DATA),
31555    SCALED_PRESSURE2(SCALED_PRESSURE2_DATA),
31556    SCALED_PRESSURE3(SCALED_PRESSURE3_DATA),
31557    SERIAL_CONTROL(SERIAL_CONTROL_DATA),
31558    SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA),
31559    SETUP_SIGNING(SETUP_SIGNING_DATA),
31560    SET_ACTUATOR_CONTROL_TARGET(SET_ACTUATOR_CONTROL_TARGET_DATA),
31561    SET_ATTITUDE_TARGET(SET_ATTITUDE_TARGET_DATA),
31562    #[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
31563    SET_GPS_GLOBAL_ORIGIN(SET_GPS_GLOBAL_ORIGIN_DATA),
31564    #[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
31565    SET_HOME_POSITION(SET_HOME_POSITION_DATA),
31566    #[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
31567    SET_MODE(SET_MODE_DATA),
31568    SET_POSITION_TARGET_GLOBAL_INT(SET_POSITION_TARGET_GLOBAL_INT_DATA),
31569    SET_POSITION_TARGET_LOCAL_NED(SET_POSITION_TARGET_LOCAL_NED_DATA),
31570    SIM_STATE(SIM_STATE_DATA),
31571    #[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
31572    SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA),
31573    STATUSTEXT(STATUSTEXT_DATA),
31574    STORAGE_INFORMATION(STORAGE_INFORMATION_DATA),
31575    SUPPORTED_TUNES(SUPPORTED_TUNES_DATA),
31576    SYSTEM_TIME(SYSTEM_TIME_DATA),
31577    SYS_STATUS(SYS_STATUS_DATA),
31578    TERRAIN_CHECK(TERRAIN_CHECK_DATA),
31579    TERRAIN_DATA(TERRAIN_DATA_DATA),
31580    TERRAIN_REPORT(TERRAIN_REPORT_DATA),
31581    TERRAIN_REQUEST(TERRAIN_REQUEST_DATA),
31582    TIMESYNC(TIMESYNC_DATA),
31583    TIME_ESTIMATE_TO_TARGET(TIME_ESTIMATE_TO_TARGET_DATA),
31584    TRAJECTORY_REPRESENTATION_BEZIER(TRAJECTORY_REPRESENTATION_BEZIER_DATA),
31585    TRAJECTORY_REPRESENTATION_WAYPOINTS(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA),
31586    TUNNEL(TUNNEL_DATA),
31587    UALBERTA_SYS_STATUS(UALBERTA_SYS_STATUS_DATA),
31588    UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA),
31589    UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA),
31590    UTM_GLOBAL_POSITION(UTM_GLOBAL_POSITION_DATA),
31591    V2_EXTENSION(V2_EXTENSION_DATA),
31592    VFR_HUD(VFR_HUD_DATA),
31593    VIBRATION(VIBRATION_DATA),
31594    VICON_POSITION_ESTIMATE(VICON_POSITION_ESTIMATE_DATA),
31595    VIDEO_STREAM_INFORMATION(VIDEO_STREAM_INFORMATION_DATA),
31596    VIDEO_STREAM_STATUS(VIDEO_STREAM_STATUS_DATA),
31597    VISION_POSITION_ESTIMATE(VISION_POSITION_ESTIMATE_DATA),
31598    VISION_SPEED_ESTIMATE(VISION_SPEED_ESTIMATE_DATA),
31599    WHEEL_DISTANCE(WHEEL_DISTANCE_DATA),
31600    WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA),
31601    WINCH_STATUS(WINCH_STATUS_DATA),
31602    WIND_COV(WIND_COV_DATA),
31603}
31604impl MavMessage {
31605    pub const fn all_ids() -> &'static [u32] {
31606        &[
31607            0u32, 1u32, 2u32, 4u32, 5u32, 6u32, 7u32, 8u32, 11u32, 20u32, 21u32, 22u32, 23u32,
31608            24u32, 25u32, 26u32, 27u32, 28u32, 29u32, 30u32, 31u32, 32u32, 33u32, 34u32, 35u32,
31609            36u32, 37u32, 38u32, 39u32, 40u32, 41u32, 42u32, 43u32, 44u32, 45u32, 46u32, 47u32,
31610            48u32, 49u32, 50u32, 51u32, 54u32, 55u32, 61u32, 62u32, 63u32, 64u32, 65u32, 66u32,
31611            67u32, 69u32, 70u32, 73u32, 74u32, 75u32, 76u32, 77u32, 80u32, 81u32, 82u32, 83u32,
31612            84u32, 85u32, 86u32, 87u32, 89u32, 90u32, 91u32, 92u32, 93u32, 100u32, 101u32, 102u32,
31613            103u32, 104u32, 105u32, 106u32, 107u32, 108u32, 109u32, 110u32, 111u32, 112u32, 113u32,
31614            114u32, 115u32, 116u32, 117u32, 118u32, 119u32, 120u32, 121u32, 122u32, 123u32, 124u32,
31615            125u32, 126u32, 127u32, 128u32, 129u32, 130u32, 131u32, 132u32, 133u32, 134u32, 135u32,
31616            136u32, 137u32, 138u32, 139u32, 140u32, 141u32, 142u32, 143u32, 144u32, 146u32, 147u32,
31617            148u32, 149u32, 162u32, 192u32, 220u32, 221u32, 222u32, 225u32, 230u32, 231u32, 232u32,
31618            233u32, 234u32, 235u32, 241u32, 242u32, 243u32, 244u32, 245u32, 246u32, 247u32, 248u32,
31619            249u32, 250u32, 251u32, 252u32, 253u32, 254u32, 256u32, 257u32, 258u32, 259u32, 260u32,
31620            261u32, 262u32, 263u32, 264u32, 265u32, 266u32, 267u32, 268u32, 269u32, 270u32, 271u32,
31621            275u32, 276u32, 277u32, 280u32, 281u32, 282u32, 283u32, 284u32, 285u32, 286u32, 287u32,
31622            288u32, 290u32, 291u32, 299u32, 300u32, 301u32, 310u32, 311u32, 320u32, 321u32, 322u32,
31623            323u32, 324u32, 330u32, 331u32, 332u32, 333u32, 334u32, 335u32, 336u32, 339u32, 340u32,
31624            350u32, 360u32, 370u32, 371u32, 372u32, 373u32, 375u32, 380u32, 385u32, 386u32, 387u32,
31625            388u32, 390u32, 395u32, 396u32, 397u32, 400u32, 401u32, 410u32, 411u32, 412u32, 413u32,
31626            435u32, 436u32, 437u32, 440u32, 9000u32, 9005u32, 12900u32, 12901u32, 12902u32,
31627            12903u32, 12904u32, 12905u32, 12915u32, 12918u32, 12919u32, 12920u32,
31628        ]
31629    }
31630}
31631impl Message for MavMessage {
31632    fn parse(
31633        version: MavlinkVersion,
31634        id: u32,
31635        payload: &[u8],
31636    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31637        match id {
31638            ACTUATOR_CONTROL_TARGET_DATA::ID => {
31639                ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
31640                    .map(Self::ACTUATOR_CONTROL_TARGET)
31641            }
31642            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::deser(version, payload)
31643                .map(Self::ACTUATOR_OUTPUT_STATUS),
31644            ADSB_VEHICLE_DATA::ID => {
31645                ADSB_VEHICLE_DATA::deser(version, payload).map(Self::ADSB_VEHICLE)
31646            }
31647            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::deser(version, payload).map(Self::AIS_VESSEL),
31648            ALTITUDE_DATA::ID => ALTITUDE_DATA::deser(version, payload).map(Self::ALTITUDE),
31649            ATTITUDE_DATA::ID => ATTITUDE_DATA::deser(version, payload).map(Self::ATTITUDE),
31650            ATTITUDE_QUATERNION_DATA::ID => {
31651                ATTITUDE_QUATERNION_DATA::deser(version, payload).map(Self::ATTITUDE_QUATERNION)
31652            }
31653            ATTITUDE_QUATERNION_COV_DATA::ID => {
31654                ATTITUDE_QUATERNION_COV_DATA::deser(version, payload)
31655                    .map(Self::ATTITUDE_QUATERNION_COV)
31656            }
31657            ATTITUDE_TARGET_DATA::ID => {
31658                ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::ATTITUDE_TARGET)
31659            }
31660            ATT_POS_MOCAP_DATA::ID => {
31661                ATT_POS_MOCAP_DATA::deser(version, payload).map(Self::ATT_POS_MOCAP)
31662            }
31663            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::deser(version, payload).map(Self::AUTH_KEY),
31664            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
31665                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::deser(version, payload)
31666                    .map(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE)
31667            }
31668            AUTOPILOT_VERSION_DATA::ID => {
31669                AUTOPILOT_VERSION_DATA::deser(version, payload).map(Self::AUTOPILOT_VERSION)
31670            }
31671            AVAILABLE_MODES_DATA::ID => {
31672                AVAILABLE_MODES_DATA::deser(version, payload).map(Self::AVAILABLE_MODES)
31673            }
31674            AVAILABLE_MODES_MONITOR_DATA::ID => {
31675                AVAILABLE_MODES_MONITOR_DATA::deser(version, payload)
31676                    .map(Self::AVAILABLE_MODES_MONITOR)
31677            }
31678            BATTERY_INFO_DATA::ID => {
31679                BATTERY_INFO_DATA::deser(version, payload).map(Self::BATTERY_INFO)
31680            }
31681            BATTERY_STATUS_DATA::ID => {
31682                BATTERY_STATUS_DATA::deser(version, payload).map(Self::BATTERY_STATUS)
31683            }
31684            BUTTON_CHANGE_DATA::ID => {
31685                BUTTON_CHANGE_DATA::deser(version, payload).map(Self::BUTTON_CHANGE)
31686            }
31687            CAMERA_CAPTURE_STATUS_DATA::ID => {
31688                CAMERA_CAPTURE_STATUS_DATA::deser(version, payload).map(Self::CAMERA_CAPTURE_STATUS)
31689            }
31690            CAMERA_FOV_STATUS_DATA::ID => {
31691                CAMERA_FOV_STATUS_DATA::deser(version, payload).map(Self::CAMERA_FOV_STATUS)
31692            }
31693            CAMERA_IMAGE_CAPTURED_DATA::ID => {
31694                CAMERA_IMAGE_CAPTURED_DATA::deser(version, payload).map(Self::CAMERA_IMAGE_CAPTURED)
31695            }
31696            CAMERA_INFORMATION_DATA::ID => {
31697                CAMERA_INFORMATION_DATA::deser(version, payload).map(Self::CAMERA_INFORMATION)
31698            }
31699            CAMERA_SETTINGS_DATA::ID => {
31700                CAMERA_SETTINGS_DATA::deser(version, payload).map(Self::CAMERA_SETTINGS)
31701            }
31702            CAMERA_THERMAL_RANGE_DATA::ID => {
31703                CAMERA_THERMAL_RANGE_DATA::deser(version, payload).map(Self::CAMERA_THERMAL_RANGE)
31704            }
31705            CAMERA_TRACKING_GEO_STATUS_DATA::ID => {
31706                CAMERA_TRACKING_GEO_STATUS_DATA::deser(version, payload)
31707                    .map(Self::CAMERA_TRACKING_GEO_STATUS)
31708            }
31709            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => {
31710                CAMERA_TRACKING_IMAGE_STATUS_DATA::deser(version, payload)
31711                    .map(Self::CAMERA_TRACKING_IMAGE_STATUS)
31712            }
31713            CAMERA_TRIGGER_DATA::ID => {
31714                CAMERA_TRIGGER_DATA::deser(version, payload).map(Self::CAMERA_TRIGGER)
31715            }
31716            CANFD_FRAME_DATA::ID => {
31717                CANFD_FRAME_DATA::deser(version, payload).map(Self::CANFD_FRAME)
31718            }
31719            CAN_FILTER_MODIFY_DATA::ID => {
31720                CAN_FILTER_MODIFY_DATA::deser(version, payload).map(Self::CAN_FILTER_MODIFY)
31721            }
31722            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::deser(version, payload).map(Self::CAN_FRAME),
31723            CELLULAR_CONFIG_DATA::ID => {
31724                CELLULAR_CONFIG_DATA::deser(version, payload).map(Self::CELLULAR_CONFIG)
31725            }
31726            CELLULAR_STATUS_DATA::ID => {
31727                CELLULAR_STATUS_DATA::deser(version, payload).map(Self::CELLULAR_STATUS)
31728            }
31729            CHANGE_OPERATOR_CONTROL_DATA::ID => {
31730                CHANGE_OPERATOR_CONTROL_DATA::deser(version, payload)
31731                    .map(Self::CHANGE_OPERATOR_CONTROL)
31732            }
31733            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => {
31734                CHANGE_OPERATOR_CONTROL_ACK_DATA::deser(version, payload)
31735                    .map(Self::CHANGE_OPERATOR_CONTROL_ACK)
31736            }
31737            COLLISION_DATA::ID => COLLISION_DATA::deser(version, payload).map(Self::COLLISION),
31738            COMMAND_ACK_DATA::ID => {
31739                COMMAND_ACK_DATA::deser(version, payload).map(Self::COMMAND_ACK)
31740            }
31741            COMMAND_CANCEL_DATA::ID => {
31742                COMMAND_CANCEL_DATA::deser(version, payload).map(Self::COMMAND_CANCEL)
31743            }
31744            COMMAND_INT_DATA::ID => {
31745                COMMAND_INT_DATA::deser(version, payload).map(Self::COMMAND_INT)
31746            }
31747            COMMAND_LONG_DATA::ID => {
31748                COMMAND_LONG_DATA::deser(version, payload).map(Self::COMMAND_LONG)
31749            }
31750            COMPONENT_INFORMATION_DATA::ID => {
31751                COMPONENT_INFORMATION_DATA::deser(version, payload).map(Self::COMPONENT_INFORMATION)
31752            }
31753            COMPONENT_INFORMATION_BASIC_DATA::ID => {
31754                COMPONENT_INFORMATION_BASIC_DATA::deser(version, payload)
31755                    .map(Self::COMPONENT_INFORMATION_BASIC)
31756            }
31757            COMPONENT_METADATA_DATA::ID => {
31758                COMPONENT_METADATA_DATA::deser(version, payload).map(Self::COMPONENT_METADATA)
31759            }
31760            CONTROL_SYSTEM_STATE_DATA::ID => {
31761                CONTROL_SYSTEM_STATE_DATA::deser(version, payload).map(Self::CONTROL_SYSTEM_STATE)
31762            }
31763            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::deser(version, payload)
31764                .map(Self::CURRENT_EVENT_SEQUENCE),
31765            CURRENT_MODE_DATA::ID => {
31766                CURRENT_MODE_DATA::deser(version, payload).map(Self::CURRENT_MODE)
31767            }
31768            DATA_STREAM_DATA::ID => {
31769                DATA_STREAM_DATA::deser(version, payload).map(Self::DATA_STREAM)
31770            }
31771            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => {
31772                DATA_TRANSMISSION_HANDSHAKE_DATA::deser(version, payload)
31773                    .map(Self::DATA_TRANSMISSION_HANDSHAKE)
31774            }
31775            DEBUG_DATA::ID => DEBUG_DATA::deser(version, payload).map(Self::DEBUG),
31776            DEBUG_FLOAT_ARRAY_DATA::ID => {
31777                DEBUG_FLOAT_ARRAY_DATA::deser(version, payload).map(Self::DEBUG_FLOAT_ARRAY)
31778            }
31779            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::deser(version, payload).map(Self::DEBUG_VECT),
31780            DISTANCE_SENSOR_DATA::ID => {
31781                DISTANCE_SENSOR_DATA::deser(version, payload).map(Self::DISTANCE_SENSOR)
31782            }
31783            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::deser(version, payload).map(Self::EFI_STATUS),
31784            ENCAPSULATED_DATA_DATA::ID => {
31785                ENCAPSULATED_DATA_DATA::deser(version, payload).map(Self::ENCAPSULATED_DATA)
31786            }
31787            ESC_INFO_DATA::ID => ESC_INFO_DATA::deser(version, payload).map(Self::ESC_INFO),
31788            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::deser(version, payload).map(Self::ESC_STATUS),
31789            ESTIMATOR_STATUS_DATA::ID => {
31790                ESTIMATOR_STATUS_DATA::deser(version, payload).map(Self::ESTIMATOR_STATUS)
31791            }
31792            EVENT_DATA::ID => EVENT_DATA::deser(version, payload).map(Self::EVENT),
31793            EXTENDED_SYS_STATE_DATA::ID => {
31794                EXTENDED_SYS_STATE_DATA::deser(version, payload).map(Self::EXTENDED_SYS_STATE)
31795            }
31796            FENCE_STATUS_DATA::ID => {
31797                FENCE_STATUS_DATA::deser(version, payload).map(Self::FENCE_STATUS)
31798            }
31799            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::deser(version, payload)
31800                .map(Self::FILE_TRANSFER_PROTOCOL),
31801            FLIGHT_INFORMATION_DATA::ID => {
31802                FLIGHT_INFORMATION_DATA::deser(version, payload).map(Self::FLIGHT_INFORMATION)
31803            }
31804            FOLLOW_TARGET_DATA::ID => {
31805                FOLLOW_TARGET_DATA::deser(version, payload).map(Self::FOLLOW_TARGET)
31806            }
31807            FUEL_STATUS_DATA::ID => {
31808                FUEL_STATUS_DATA::deser(version, payload).map(Self::FUEL_STATUS)
31809            }
31810            GENERATOR_STATUS_DATA::ID => {
31811                GENERATOR_STATUS_DATA::deser(version, payload).map(Self::GENERATOR_STATUS)
31812            }
31813            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => {
31814                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::deser(version, payload)
31815                    .map(Self::GIMBAL_DEVICE_ATTITUDE_STATUS)
31816            }
31817            GIMBAL_DEVICE_INFORMATION_DATA::ID => {
31818                GIMBAL_DEVICE_INFORMATION_DATA::deser(version, payload)
31819                    .map(Self::GIMBAL_DEVICE_INFORMATION)
31820            }
31821            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => {
31822                GIMBAL_DEVICE_SET_ATTITUDE_DATA::deser(version, payload)
31823                    .map(Self::GIMBAL_DEVICE_SET_ATTITUDE)
31824            }
31825            GIMBAL_MANAGER_INFORMATION_DATA::ID => {
31826                GIMBAL_MANAGER_INFORMATION_DATA::deser(version, payload)
31827                    .map(Self::GIMBAL_MANAGER_INFORMATION)
31828            }
31829            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => {
31830                GIMBAL_MANAGER_SET_ATTITUDE_DATA::deser(version, payload)
31831                    .map(Self::GIMBAL_MANAGER_SET_ATTITUDE)
31832            }
31833            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
31834                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::deser(version, payload)
31835                    .map(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL)
31836            }
31837            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => {
31838                GIMBAL_MANAGER_SET_PITCHYAW_DATA::deser(version, payload)
31839                    .map(Self::GIMBAL_MANAGER_SET_PITCHYAW)
31840            }
31841            GIMBAL_MANAGER_STATUS_DATA::ID => {
31842                GIMBAL_MANAGER_STATUS_DATA::deser(version, payload).map(Self::GIMBAL_MANAGER_STATUS)
31843            }
31844            GLOBAL_POSITION_INT_DATA::ID => {
31845                GLOBAL_POSITION_INT_DATA::deser(version, payload).map(Self::GLOBAL_POSITION_INT)
31846            }
31847            GLOBAL_POSITION_INT_COV_DATA::ID => {
31848                GLOBAL_POSITION_INT_COV_DATA::deser(version, payload)
31849                    .map(Self::GLOBAL_POSITION_INT_COV)
31850            }
31851            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
31852                GLOBAL_VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
31853                    .map(Self::GLOBAL_VISION_POSITION_ESTIMATE)
31854            }
31855            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::deser(version, payload).map(Self::GPS2_RAW),
31856            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::deser(version, payload).map(Self::GPS2_RTK),
31857            GPS_GLOBAL_ORIGIN_DATA::ID => {
31858                GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::GPS_GLOBAL_ORIGIN)
31859            }
31860            GPS_INJECT_DATA_DATA::ID => {
31861                GPS_INJECT_DATA_DATA::deser(version, payload).map(Self::GPS_INJECT_DATA)
31862            }
31863            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::deser(version, payload).map(Self::GPS_INPUT),
31864            GPS_RAW_INT_DATA::ID => {
31865                GPS_RAW_INT_DATA::deser(version, payload).map(Self::GPS_RAW_INT)
31866            }
31867            GPS_RTCM_DATA_DATA::ID => {
31868                GPS_RTCM_DATA_DATA::deser(version, payload).map(Self::GPS_RTCM_DATA)
31869            }
31870            GPS_RTK_DATA::ID => GPS_RTK_DATA::deser(version, payload).map(Self::GPS_RTK),
31871            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::deser(version, payload).map(Self::GPS_STATUS),
31872            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::deser(version, payload).map(Self::HEARTBEAT),
31873            HIGHRES_IMU_DATA::ID => {
31874                HIGHRES_IMU_DATA::deser(version, payload).map(Self::HIGHRES_IMU)
31875            }
31876            HIGH_LATENCY_DATA::ID => {
31877                HIGH_LATENCY_DATA::deser(version, payload).map(Self::HIGH_LATENCY)
31878            }
31879            HIGH_LATENCY2_DATA::ID => {
31880                HIGH_LATENCY2_DATA::deser(version, payload).map(Self::HIGH_LATENCY2)
31881            }
31882            HIL_ACTUATOR_CONTROLS_DATA::ID => {
31883                HIL_ACTUATOR_CONTROLS_DATA::deser(version, payload).map(Self::HIL_ACTUATOR_CONTROLS)
31884            }
31885            HIL_CONTROLS_DATA::ID => {
31886                HIL_CONTROLS_DATA::deser(version, payload).map(Self::HIL_CONTROLS)
31887            }
31888            HIL_GPS_DATA::ID => HIL_GPS_DATA::deser(version, payload).map(Self::HIL_GPS),
31889            HIL_OPTICAL_FLOW_DATA::ID => {
31890                HIL_OPTICAL_FLOW_DATA::deser(version, payload).map(Self::HIL_OPTICAL_FLOW)
31891            }
31892            HIL_RC_INPUTS_RAW_DATA::ID => {
31893                HIL_RC_INPUTS_RAW_DATA::deser(version, payload).map(Self::HIL_RC_INPUTS_RAW)
31894            }
31895            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::deser(version, payload).map(Self::HIL_SENSOR),
31896            HIL_STATE_DATA::ID => HIL_STATE_DATA::deser(version, payload).map(Self::HIL_STATE),
31897            HIL_STATE_QUATERNION_DATA::ID => {
31898                HIL_STATE_QUATERNION_DATA::deser(version, payload).map(Self::HIL_STATE_QUATERNION)
31899            }
31900            HOME_POSITION_DATA::ID => {
31901                HOME_POSITION_DATA::deser(version, payload).map(Self::HOME_POSITION)
31902            }
31903            HYGROMETER_SENSOR_DATA::ID => {
31904                HYGROMETER_SENSOR_DATA::deser(version, payload).map(Self::HYGROMETER_SENSOR)
31905            }
31906            ILLUMINATOR_STATUS_DATA::ID => {
31907                ILLUMINATOR_STATUS_DATA::deser(version, payload).map(Self::ILLUMINATOR_STATUS)
31908            }
31909            ISBD_LINK_STATUS_DATA::ID => {
31910                ISBD_LINK_STATUS_DATA::deser(version, payload).map(Self::ISBD_LINK_STATUS)
31911            }
31912            LANDING_TARGET_DATA::ID => {
31913                LANDING_TARGET_DATA::deser(version, payload).map(Self::LANDING_TARGET)
31914            }
31915            LINK_NODE_STATUS_DATA::ID => {
31916                LINK_NODE_STATUS_DATA::deser(version, payload).map(Self::LINK_NODE_STATUS)
31917            }
31918            LOCAL_POSITION_NED_DATA::ID => {
31919                LOCAL_POSITION_NED_DATA::deser(version, payload).map(Self::LOCAL_POSITION_NED)
31920            }
31921            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::deser(version, payload)
31922                .map(Self::LOCAL_POSITION_NED_COV),
31923            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
31924                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::deser(version, payload)
31925                    .map(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET)
31926            }
31927            LOGGING_ACK_DATA::ID => {
31928                LOGGING_ACK_DATA::deser(version, payload).map(Self::LOGGING_ACK)
31929            }
31930            LOGGING_DATA_DATA::ID => {
31931                LOGGING_DATA_DATA::deser(version, payload).map(Self::LOGGING_DATA)
31932            }
31933            LOGGING_DATA_ACKED_DATA::ID => {
31934                LOGGING_DATA_ACKED_DATA::deser(version, payload).map(Self::LOGGING_DATA_ACKED)
31935            }
31936            LOG_DATA_DATA::ID => LOG_DATA_DATA::deser(version, payload).map(Self::LOG_DATA),
31937            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::deser(version, payload).map(Self::LOG_ENTRY),
31938            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::deser(version, payload).map(Self::LOG_ERASE),
31939            LOG_REQUEST_DATA_DATA::ID => {
31940                LOG_REQUEST_DATA_DATA::deser(version, payload).map(Self::LOG_REQUEST_DATA)
31941            }
31942            LOG_REQUEST_END_DATA::ID => {
31943                LOG_REQUEST_END_DATA::deser(version, payload).map(Self::LOG_REQUEST_END)
31944            }
31945            LOG_REQUEST_LIST_DATA::ID => {
31946                LOG_REQUEST_LIST_DATA::deser(version, payload).map(Self::LOG_REQUEST_LIST)
31947            }
31948            MAG_CAL_REPORT_DATA::ID => {
31949                MAG_CAL_REPORT_DATA::deser(version, payload).map(Self::MAG_CAL_REPORT)
31950            }
31951            MANUAL_CONTROL_DATA::ID => {
31952                MANUAL_CONTROL_DATA::deser(version, payload).map(Self::MANUAL_CONTROL)
31953            }
31954            MANUAL_SETPOINT_DATA::ID => {
31955                MANUAL_SETPOINT_DATA::deser(version, payload).map(Self::MANUAL_SETPOINT)
31956            }
31957            MEMORY_VECT_DATA::ID => {
31958                MEMORY_VECT_DATA::deser(version, payload).map(Self::MEMORY_VECT)
31959            }
31960            MESSAGE_INTERVAL_DATA::ID => {
31961                MESSAGE_INTERVAL_DATA::deser(version, payload).map(Self::MESSAGE_INTERVAL)
31962            }
31963            MISSION_ACK_DATA::ID => {
31964                MISSION_ACK_DATA::deser(version, payload).map(Self::MISSION_ACK)
31965            }
31966            MISSION_CLEAR_ALL_DATA::ID => {
31967                MISSION_CLEAR_ALL_DATA::deser(version, payload).map(Self::MISSION_CLEAR_ALL)
31968            }
31969            MISSION_COUNT_DATA::ID => {
31970                MISSION_COUNT_DATA::deser(version, payload).map(Self::MISSION_COUNT)
31971            }
31972            MISSION_CURRENT_DATA::ID => {
31973                MISSION_CURRENT_DATA::deser(version, payload).map(Self::MISSION_CURRENT)
31974            }
31975            MISSION_ITEM_DATA::ID => {
31976                MISSION_ITEM_DATA::deser(version, payload).map(Self::MISSION_ITEM)
31977            }
31978            MISSION_ITEM_INT_DATA::ID => {
31979                MISSION_ITEM_INT_DATA::deser(version, payload).map(Self::MISSION_ITEM_INT)
31980            }
31981            MISSION_ITEM_REACHED_DATA::ID => {
31982                MISSION_ITEM_REACHED_DATA::deser(version, payload).map(Self::MISSION_ITEM_REACHED)
31983            }
31984            MISSION_REQUEST_DATA::ID => {
31985                MISSION_REQUEST_DATA::deser(version, payload).map(Self::MISSION_REQUEST)
31986            }
31987            MISSION_REQUEST_INT_DATA::ID => {
31988                MISSION_REQUEST_INT_DATA::deser(version, payload).map(Self::MISSION_REQUEST_INT)
31989            }
31990            MISSION_REQUEST_LIST_DATA::ID => {
31991                MISSION_REQUEST_LIST_DATA::deser(version, payload).map(Self::MISSION_REQUEST_LIST)
31992            }
31993            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => {
31994                MISSION_REQUEST_PARTIAL_LIST_DATA::deser(version, payload)
31995                    .map(Self::MISSION_REQUEST_PARTIAL_LIST)
31996            }
31997            MISSION_SET_CURRENT_DATA::ID => {
31998                MISSION_SET_CURRENT_DATA::deser(version, payload).map(Self::MISSION_SET_CURRENT)
31999            }
32000            MISSION_WRITE_PARTIAL_LIST_DATA::ID => {
32001                MISSION_WRITE_PARTIAL_LIST_DATA::deser(version, payload)
32002                    .map(Self::MISSION_WRITE_PARTIAL_LIST)
32003            }
32004            MOUNT_ORIENTATION_DATA::ID => {
32005                MOUNT_ORIENTATION_DATA::deser(version, payload).map(Self::MOUNT_ORIENTATION)
32006            }
32007            NAMED_VALUE_FLOAT_DATA::ID => {
32008                NAMED_VALUE_FLOAT_DATA::deser(version, payload).map(Self::NAMED_VALUE_FLOAT)
32009            }
32010            NAMED_VALUE_INT_DATA::ID => {
32011                NAMED_VALUE_INT_DATA::deser(version, payload).map(Self::NAMED_VALUE_INT)
32012            }
32013            NAV_CONTROLLER_OUTPUT_DATA::ID => {
32014                NAV_CONTROLLER_OUTPUT_DATA::deser(version, payload).map(Self::NAV_CONTROLLER_OUTPUT)
32015            }
32016            NAV_FILTER_BIAS_DATA::ID => {
32017                NAV_FILTER_BIAS_DATA::deser(version, payload).map(Self::NAV_FILTER_BIAS)
32018            }
32019            OBSTACLE_DISTANCE_DATA::ID => {
32020                OBSTACLE_DISTANCE_DATA::deser(version, payload).map(Self::OBSTACLE_DISTANCE)
32021            }
32022            ODOMETRY_DATA::ID => ODOMETRY_DATA::deser(version, payload).map(Self::ODOMETRY),
32023            ONBOARD_COMPUTER_STATUS_DATA::ID => {
32024                ONBOARD_COMPUTER_STATUS_DATA::deser(version, payload)
32025                    .map(Self::ONBOARD_COMPUTER_STATUS)
32026            }
32027            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => {
32028                OPEN_DRONE_ID_ARM_STATUS_DATA::deser(version, payload)
32029                    .map(Self::OPEN_DRONE_ID_ARM_STATUS)
32030            }
32031            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => {
32032                OPEN_DRONE_ID_AUTHENTICATION_DATA::deser(version, payload)
32033                    .map(Self::OPEN_DRONE_ID_AUTHENTICATION)
32034            }
32035            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::deser(version, payload)
32036                .map(Self::OPEN_DRONE_ID_BASIC_ID),
32037            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::deser(version, payload)
32038                .map(Self::OPEN_DRONE_ID_LOCATION),
32039            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => {
32040                OPEN_DRONE_ID_MESSAGE_PACK_DATA::deser(version, payload)
32041                    .map(Self::OPEN_DRONE_ID_MESSAGE_PACK)
32042            }
32043            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => {
32044                OPEN_DRONE_ID_OPERATOR_ID_DATA::deser(version, payload)
32045                    .map(Self::OPEN_DRONE_ID_OPERATOR_ID)
32046            }
32047            OPEN_DRONE_ID_SELF_ID_DATA::ID => {
32048                OPEN_DRONE_ID_SELF_ID_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SELF_ID)
32049            }
32050            OPEN_DRONE_ID_SYSTEM_DATA::ID => {
32051                OPEN_DRONE_ID_SYSTEM_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SYSTEM)
32052            }
32053            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => {
32054                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::deser(version, payload)
32055                    .map(Self::OPEN_DRONE_ID_SYSTEM_UPDATE)
32056            }
32057            OPTICAL_FLOW_DATA::ID => {
32058                OPTICAL_FLOW_DATA::deser(version, payload).map(Self::OPTICAL_FLOW)
32059            }
32060            OPTICAL_FLOW_RAD_DATA::ID => {
32061                OPTICAL_FLOW_RAD_DATA::deser(version, payload).map(Self::OPTICAL_FLOW_RAD)
32062            }
32063            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::deser(version, payload)
32064                .map(Self::ORBIT_EXECUTION_STATUS),
32065            PARAM_EXT_ACK_DATA::ID => {
32066                PARAM_EXT_ACK_DATA::deser(version, payload).map(Self::PARAM_EXT_ACK)
32067            }
32068            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::deser(version, payload)
32069                .map(Self::PARAM_EXT_REQUEST_LIST),
32070            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::deser(version, payload)
32071                .map(Self::PARAM_EXT_REQUEST_READ),
32072            PARAM_EXT_SET_DATA::ID => {
32073                PARAM_EXT_SET_DATA::deser(version, payload).map(Self::PARAM_EXT_SET)
32074            }
32075            PARAM_EXT_VALUE_DATA::ID => {
32076                PARAM_EXT_VALUE_DATA::deser(version, payload).map(Self::PARAM_EXT_VALUE)
32077            }
32078            PARAM_MAP_RC_DATA::ID => {
32079                PARAM_MAP_RC_DATA::deser(version, payload).map(Self::PARAM_MAP_RC)
32080            }
32081            PARAM_REQUEST_LIST_DATA::ID => {
32082                PARAM_REQUEST_LIST_DATA::deser(version, payload).map(Self::PARAM_REQUEST_LIST)
32083            }
32084            PARAM_REQUEST_READ_DATA::ID => {
32085                PARAM_REQUEST_READ_DATA::deser(version, payload).map(Self::PARAM_REQUEST_READ)
32086            }
32087            PARAM_SET_DATA::ID => PARAM_SET_DATA::deser(version, payload).map(Self::PARAM_SET),
32088            PARAM_VALUE_DATA::ID => {
32089                PARAM_VALUE_DATA::deser(version, payload).map(Self::PARAM_VALUE)
32090            }
32091            PING_DATA::ID => PING_DATA::deser(version, payload).map(Self::PING),
32092            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::deser(version, payload).map(Self::PLAY_TUNE),
32093            PLAY_TUNE_V2_DATA::ID => {
32094                PLAY_TUNE_V2_DATA::deser(version, payload).map(Self::PLAY_TUNE_V2)
32095            }
32096            POSITION_TARGET_GLOBAL_INT_DATA::ID => {
32097                POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
32098                    .map(Self::POSITION_TARGET_GLOBAL_INT)
32099            }
32100            POSITION_TARGET_LOCAL_NED_DATA::ID => {
32101                POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
32102                    .map(Self::POSITION_TARGET_LOCAL_NED)
32103            }
32104            POWER_STATUS_DATA::ID => {
32105                POWER_STATUS_DATA::deser(version, payload).map(Self::POWER_STATUS)
32106            }
32107            PROTOCOL_VERSION_DATA::ID => {
32108                PROTOCOL_VERSION_DATA::deser(version, payload).map(Self::PROTOCOL_VERSION)
32109            }
32110            RADIO_CALIBRATION_DATA::ID => {
32111                RADIO_CALIBRATION_DATA::deser(version, payload).map(Self::RADIO_CALIBRATION)
32112            }
32113            RADIO_STATUS_DATA::ID => {
32114                RADIO_STATUS_DATA::deser(version, payload).map(Self::RADIO_STATUS)
32115            }
32116            RAW_IMU_DATA::ID => RAW_IMU_DATA::deser(version, payload).map(Self::RAW_IMU),
32117            RAW_PRESSURE_DATA::ID => {
32118                RAW_PRESSURE_DATA::deser(version, payload).map(Self::RAW_PRESSURE)
32119            }
32120            RAW_RPM_DATA::ID => RAW_RPM_DATA::deser(version, payload).map(Self::RAW_RPM),
32121            RC_CHANNELS_DATA::ID => {
32122                RC_CHANNELS_DATA::deser(version, payload).map(Self::RC_CHANNELS)
32123            }
32124            RC_CHANNELS_OVERRIDE_DATA::ID => {
32125                RC_CHANNELS_OVERRIDE_DATA::deser(version, payload).map(Self::RC_CHANNELS_OVERRIDE)
32126            }
32127            RC_CHANNELS_RAW_DATA::ID => {
32128                RC_CHANNELS_RAW_DATA::deser(version, payload).map(Self::RC_CHANNELS_RAW)
32129            }
32130            RC_CHANNELS_SCALED_DATA::ID => {
32131                RC_CHANNELS_SCALED_DATA::deser(version, payload).map(Self::RC_CHANNELS_SCALED)
32132            }
32133            REQUEST_DATA_STREAM_DATA::ID => {
32134                REQUEST_DATA_STREAM_DATA::deser(version, payload).map(Self::REQUEST_DATA_STREAM)
32135            }
32136            REQUEST_EVENT_DATA::ID => {
32137                REQUEST_EVENT_DATA::deser(version, payload).map(Self::REQUEST_EVENT)
32138            }
32139            RESOURCE_REQUEST_DATA::ID => {
32140                RESOURCE_REQUEST_DATA::deser(version, payload).map(Self::RESOURCE_REQUEST)
32141            }
32142            RESPONSE_EVENT_ERROR_DATA::ID => {
32143                RESPONSE_EVENT_ERROR_DATA::deser(version, payload).map(Self::RESPONSE_EVENT_ERROR)
32144            }
32145            SAFETY_ALLOWED_AREA_DATA::ID => {
32146                SAFETY_ALLOWED_AREA_DATA::deser(version, payload).map(Self::SAFETY_ALLOWED_AREA)
32147            }
32148            SAFETY_SET_ALLOWED_AREA_DATA::ID => {
32149                SAFETY_SET_ALLOWED_AREA_DATA::deser(version, payload)
32150                    .map(Self::SAFETY_SET_ALLOWED_AREA)
32151            }
32152            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::deser(version, payload).map(Self::SCALED_IMU),
32153            SCALED_IMU2_DATA::ID => {
32154                SCALED_IMU2_DATA::deser(version, payload).map(Self::SCALED_IMU2)
32155            }
32156            SCALED_IMU3_DATA::ID => {
32157                SCALED_IMU3_DATA::deser(version, payload).map(Self::SCALED_IMU3)
32158            }
32159            SCALED_PRESSURE_DATA::ID => {
32160                SCALED_PRESSURE_DATA::deser(version, payload).map(Self::SCALED_PRESSURE)
32161            }
32162            SCALED_PRESSURE2_DATA::ID => {
32163                SCALED_PRESSURE2_DATA::deser(version, payload).map(Self::SCALED_PRESSURE2)
32164            }
32165            SCALED_PRESSURE3_DATA::ID => {
32166                SCALED_PRESSURE3_DATA::deser(version, payload).map(Self::SCALED_PRESSURE3)
32167            }
32168            SERIAL_CONTROL_DATA::ID => {
32169                SERIAL_CONTROL_DATA::deser(version, payload).map(Self::SERIAL_CONTROL)
32170            }
32171            SERVO_OUTPUT_RAW_DATA::ID => {
32172                SERVO_OUTPUT_RAW_DATA::deser(version, payload).map(Self::SERVO_OUTPUT_RAW)
32173            }
32174            SETUP_SIGNING_DATA::ID => {
32175                SETUP_SIGNING_DATA::deser(version, payload).map(Self::SETUP_SIGNING)
32176            }
32177            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => {
32178                SET_ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
32179                    .map(Self::SET_ACTUATOR_CONTROL_TARGET)
32180            }
32181            SET_ATTITUDE_TARGET_DATA::ID => {
32182                SET_ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::SET_ATTITUDE_TARGET)
32183            }
32184            SET_GPS_GLOBAL_ORIGIN_DATA::ID => {
32185                SET_GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::SET_GPS_GLOBAL_ORIGIN)
32186            }
32187            SET_HOME_POSITION_DATA::ID => {
32188                SET_HOME_POSITION_DATA::deser(version, payload).map(Self::SET_HOME_POSITION)
32189            }
32190            SET_MODE_DATA::ID => SET_MODE_DATA::deser(version, payload).map(Self::SET_MODE),
32191            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
32192                SET_POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
32193                    .map(Self::SET_POSITION_TARGET_GLOBAL_INT)
32194            }
32195            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => {
32196                SET_POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
32197                    .map(Self::SET_POSITION_TARGET_LOCAL_NED)
32198            }
32199            SIM_STATE_DATA::ID => SIM_STATE_DATA::deser(version, payload).map(Self::SIM_STATE),
32200            SMART_BATTERY_INFO_DATA::ID => {
32201                SMART_BATTERY_INFO_DATA::deser(version, payload).map(Self::SMART_BATTERY_INFO)
32202            }
32203            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::deser(version, payload).map(Self::STATUSTEXT),
32204            STORAGE_INFORMATION_DATA::ID => {
32205                STORAGE_INFORMATION_DATA::deser(version, payload).map(Self::STORAGE_INFORMATION)
32206            }
32207            SUPPORTED_TUNES_DATA::ID => {
32208                SUPPORTED_TUNES_DATA::deser(version, payload).map(Self::SUPPORTED_TUNES)
32209            }
32210            SYSTEM_TIME_DATA::ID => {
32211                SYSTEM_TIME_DATA::deser(version, payload).map(Self::SYSTEM_TIME)
32212            }
32213            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::deser(version, payload).map(Self::SYS_STATUS),
32214            TERRAIN_CHECK_DATA::ID => {
32215                TERRAIN_CHECK_DATA::deser(version, payload).map(Self::TERRAIN_CHECK)
32216            }
32217            TERRAIN_DATA_DATA::ID => {
32218                TERRAIN_DATA_DATA::deser(version, payload).map(Self::TERRAIN_DATA)
32219            }
32220            TERRAIN_REPORT_DATA::ID => {
32221                TERRAIN_REPORT_DATA::deser(version, payload).map(Self::TERRAIN_REPORT)
32222            }
32223            TERRAIN_REQUEST_DATA::ID => {
32224                TERRAIN_REQUEST_DATA::deser(version, payload).map(Self::TERRAIN_REQUEST)
32225            }
32226            TIMESYNC_DATA::ID => TIMESYNC_DATA::deser(version, payload).map(Self::TIMESYNC),
32227            TIME_ESTIMATE_TO_TARGET_DATA::ID => {
32228                TIME_ESTIMATE_TO_TARGET_DATA::deser(version, payload)
32229                    .map(Self::TIME_ESTIMATE_TO_TARGET)
32230            }
32231            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
32232                TRAJECTORY_REPRESENTATION_BEZIER_DATA::deser(version, payload)
32233                    .map(Self::TRAJECTORY_REPRESENTATION_BEZIER)
32234            }
32235            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
32236                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::deser(version, payload)
32237                    .map(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS)
32238            }
32239            TUNNEL_DATA::ID => TUNNEL_DATA::deser(version, payload).map(Self::TUNNEL),
32240            UALBERTA_SYS_STATUS_DATA::ID => {
32241                UALBERTA_SYS_STATUS_DATA::deser(version, payload).map(Self::UALBERTA_SYS_STATUS)
32242            }
32243            UAVCAN_NODE_INFO_DATA::ID => {
32244                UAVCAN_NODE_INFO_DATA::deser(version, payload).map(Self::UAVCAN_NODE_INFO)
32245            }
32246            UAVCAN_NODE_STATUS_DATA::ID => {
32247                UAVCAN_NODE_STATUS_DATA::deser(version, payload).map(Self::UAVCAN_NODE_STATUS)
32248            }
32249            UTM_GLOBAL_POSITION_DATA::ID => {
32250                UTM_GLOBAL_POSITION_DATA::deser(version, payload).map(Self::UTM_GLOBAL_POSITION)
32251            }
32252            V2_EXTENSION_DATA::ID => {
32253                V2_EXTENSION_DATA::deser(version, payload).map(Self::V2_EXTENSION)
32254            }
32255            VFR_HUD_DATA::ID => VFR_HUD_DATA::deser(version, payload).map(Self::VFR_HUD),
32256            VIBRATION_DATA::ID => VIBRATION_DATA::deser(version, payload).map(Self::VIBRATION),
32257            VICON_POSITION_ESTIMATE_DATA::ID => {
32258                VICON_POSITION_ESTIMATE_DATA::deser(version, payload)
32259                    .map(Self::VICON_POSITION_ESTIMATE)
32260            }
32261            VIDEO_STREAM_INFORMATION_DATA::ID => {
32262                VIDEO_STREAM_INFORMATION_DATA::deser(version, payload)
32263                    .map(Self::VIDEO_STREAM_INFORMATION)
32264            }
32265            VIDEO_STREAM_STATUS_DATA::ID => {
32266                VIDEO_STREAM_STATUS_DATA::deser(version, payload).map(Self::VIDEO_STREAM_STATUS)
32267            }
32268            VISION_POSITION_ESTIMATE_DATA::ID => {
32269                VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
32270                    .map(Self::VISION_POSITION_ESTIMATE)
32271            }
32272            VISION_SPEED_ESTIMATE_DATA::ID => {
32273                VISION_SPEED_ESTIMATE_DATA::deser(version, payload).map(Self::VISION_SPEED_ESTIMATE)
32274            }
32275            WHEEL_DISTANCE_DATA::ID => {
32276                WHEEL_DISTANCE_DATA::deser(version, payload).map(Self::WHEEL_DISTANCE)
32277            }
32278            WIFI_CONFIG_AP_DATA::ID => {
32279                WIFI_CONFIG_AP_DATA::deser(version, payload).map(Self::WIFI_CONFIG_AP)
32280            }
32281            WINCH_STATUS_DATA::ID => {
32282                WINCH_STATUS_DATA::deser(version, payload).map(Self::WINCH_STATUS)
32283            }
32284            WIND_COV_DATA::ID => WIND_COV_DATA::deser(version, payload).map(Self::WIND_COV),
32285            _ => Err(::mavlink_core::error::ParserError::UnknownMessage { id }),
32286        }
32287    }
32288    fn message_name(&self) -> &'static str {
32289        match self {
32290            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::NAME,
32291            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::NAME,
32292            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::NAME,
32293            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::NAME,
32294            Self::ALTITUDE(..) => ALTITUDE_DATA::NAME,
32295            Self::ATTITUDE(..) => ATTITUDE_DATA::NAME,
32296            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::NAME,
32297            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::NAME,
32298            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::NAME,
32299            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::NAME,
32300            Self::AUTH_KEY(..) => AUTH_KEY_DATA::NAME,
32301            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
32302                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME
32303            }
32304            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::NAME,
32305            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::NAME,
32306            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::NAME,
32307            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::NAME,
32308            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::NAME,
32309            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::NAME,
32310            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::NAME,
32311            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::NAME,
32312            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::NAME,
32313            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::NAME,
32314            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::NAME,
32315            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::NAME,
32316            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
32317            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
32318            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::NAME,
32319            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::NAME,
32320            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::NAME,
32321            Self::CAN_FRAME(..) => CAN_FRAME_DATA::NAME,
32322            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::NAME,
32323            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::NAME,
32324            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::NAME,
32325            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
32326            Self::COLLISION(..) => COLLISION_DATA::NAME,
32327            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::NAME,
32328            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::NAME,
32329            Self::COMMAND_INT(..) => COMMAND_INT_DATA::NAME,
32330            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::NAME,
32331            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::NAME,
32332            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::NAME,
32333            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::NAME,
32334            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::NAME,
32335            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::NAME,
32336            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::NAME,
32337            Self::DATA_STREAM(..) => DATA_STREAM_DATA::NAME,
32338            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
32339            Self::DEBUG(..) => DEBUG_DATA::NAME,
32340            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::NAME,
32341            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::NAME,
32342            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::NAME,
32343            Self::EFI_STATUS(..) => EFI_STATUS_DATA::NAME,
32344            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::NAME,
32345            Self::ESC_INFO(..) => ESC_INFO_DATA::NAME,
32346            Self::ESC_STATUS(..) => ESC_STATUS_DATA::NAME,
32347            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::NAME,
32348            Self::EVENT(..) => EVENT_DATA::NAME,
32349            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::NAME,
32350            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::NAME,
32351            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::NAME,
32352            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::NAME,
32353            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::NAME,
32354            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::NAME,
32355            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::NAME,
32356            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
32357            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::NAME,
32358            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
32359            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::NAME,
32360            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
32361            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
32362                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME
32363            }
32364            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
32365            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::NAME,
32366            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::NAME,
32367            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::NAME,
32368            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
32369            Self::GPS2_RAW(..) => GPS2_RAW_DATA::NAME,
32370            Self::GPS2_RTK(..) => GPS2_RTK_DATA::NAME,
32371            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::NAME,
32372            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::NAME,
32373            Self::GPS_INPUT(..) => GPS_INPUT_DATA::NAME,
32374            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::NAME,
32375            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::NAME,
32376            Self::GPS_RTK(..) => GPS_RTK_DATA::NAME,
32377            Self::GPS_STATUS(..) => GPS_STATUS_DATA::NAME,
32378            Self::HEARTBEAT(..) => HEARTBEAT_DATA::NAME,
32379            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::NAME,
32380            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::NAME,
32381            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::NAME,
32382            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::NAME,
32383            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::NAME,
32384            Self::HIL_GPS(..) => HIL_GPS_DATA::NAME,
32385            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::NAME,
32386            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::NAME,
32387            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::NAME,
32388            Self::HIL_STATE(..) => HIL_STATE_DATA::NAME,
32389            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::NAME,
32390            Self::HOME_POSITION(..) => HOME_POSITION_DATA::NAME,
32391            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::NAME,
32392            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::NAME,
32393            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::NAME,
32394            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::NAME,
32395            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::NAME,
32396            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::NAME,
32397            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::NAME,
32398            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
32399                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME
32400            }
32401            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::NAME,
32402            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::NAME,
32403            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::NAME,
32404            Self::LOG_DATA(..) => LOG_DATA_DATA::NAME,
32405            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::NAME,
32406            Self::LOG_ERASE(..) => LOG_ERASE_DATA::NAME,
32407            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::NAME,
32408            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::NAME,
32409            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::NAME,
32410            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::NAME,
32411            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::NAME,
32412            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::NAME,
32413            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::NAME,
32414            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::NAME,
32415            Self::MISSION_ACK(..) => MISSION_ACK_DATA::NAME,
32416            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::NAME,
32417            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::NAME,
32418            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::NAME,
32419            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::NAME,
32420            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::NAME,
32421            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::NAME,
32422            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::NAME,
32423            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::NAME,
32424            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::NAME,
32425            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
32426            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::NAME,
32427            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
32428            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::NAME,
32429            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::NAME,
32430            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::NAME,
32431            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::NAME,
32432            Self::NAV_FILTER_BIAS(..) => NAV_FILTER_BIAS_DATA::NAME,
32433            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::NAME,
32434            Self::ODOMETRY(..) => ODOMETRY_DATA::NAME,
32435            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::NAME,
32436            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
32437            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
32438            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
32439            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::NAME,
32440            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
32441            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
32442            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::NAME,
32443            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::NAME,
32444            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
32445            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::NAME,
32446            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::NAME,
32447            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::NAME,
32448            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::NAME,
32449            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::NAME,
32450            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::NAME,
32451            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::NAME,
32452            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::NAME,
32453            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::NAME,
32454            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::NAME,
32455            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::NAME,
32456            Self::PARAM_SET(..) => PARAM_SET_DATA::NAME,
32457            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::NAME,
32458            Self::PING(..) => PING_DATA::NAME,
32459            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::NAME,
32460            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::NAME,
32461            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::NAME,
32462            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::NAME,
32463            Self::POWER_STATUS(..) => POWER_STATUS_DATA::NAME,
32464            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::NAME,
32465            Self::RADIO_CALIBRATION(..) => RADIO_CALIBRATION_DATA::NAME,
32466            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::NAME,
32467            Self::RAW_IMU(..) => RAW_IMU_DATA::NAME,
32468            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::NAME,
32469            Self::RAW_RPM(..) => RAW_RPM_DATA::NAME,
32470            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::NAME,
32471            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::NAME,
32472            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::NAME,
32473            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::NAME,
32474            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::NAME,
32475            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::NAME,
32476            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::NAME,
32477            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::NAME,
32478            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::NAME,
32479            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::NAME,
32480            Self::SCALED_IMU(..) => SCALED_IMU_DATA::NAME,
32481            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::NAME,
32482            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::NAME,
32483            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::NAME,
32484            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::NAME,
32485            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::NAME,
32486            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::NAME,
32487            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::NAME,
32488            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::NAME,
32489            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
32490            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::NAME,
32491            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
32492            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::NAME,
32493            Self::SET_MODE(..) => SET_MODE_DATA::NAME,
32494            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
32495            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
32496            Self::SIM_STATE(..) => SIM_STATE_DATA::NAME,
32497            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::NAME,
32498            Self::STATUSTEXT(..) => STATUSTEXT_DATA::NAME,
32499            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::NAME,
32500            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::NAME,
32501            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::NAME,
32502            Self::SYS_STATUS(..) => SYS_STATUS_DATA::NAME,
32503            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::NAME,
32504            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::NAME,
32505            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::NAME,
32506            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::NAME,
32507            Self::TIMESYNC(..) => TIMESYNC_DATA::NAME,
32508            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::NAME,
32509            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => {
32510                TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME
32511            }
32512            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
32513                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME
32514            }
32515            Self::TUNNEL(..) => TUNNEL_DATA::NAME,
32516            Self::UALBERTA_SYS_STATUS(..) => UALBERTA_SYS_STATUS_DATA::NAME,
32517            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::NAME,
32518            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::NAME,
32519            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::NAME,
32520            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::NAME,
32521            Self::VFR_HUD(..) => VFR_HUD_DATA::NAME,
32522            Self::VIBRATION(..) => VIBRATION_DATA::NAME,
32523            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::NAME,
32524            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::NAME,
32525            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::NAME,
32526            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::NAME,
32527            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::NAME,
32528            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::NAME,
32529            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::NAME,
32530            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::NAME,
32531            Self::WIND_COV(..) => WIND_COV_DATA::NAME,
32532        }
32533    }
32534    fn message_id(&self) -> u32 {
32535        match self {
32536            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::ID,
32537            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::ID,
32538            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::ID,
32539            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::ID,
32540            Self::ALTITUDE(..) => ALTITUDE_DATA::ID,
32541            Self::ATTITUDE(..) => ATTITUDE_DATA::ID,
32542            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::ID,
32543            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::ID,
32544            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::ID,
32545            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::ID,
32546            Self::AUTH_KEY(..) => AUTH_KEY_DATA::ID,
32547            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
32548                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID
32549            }
32550            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::ID,
32551            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::ID,
32552            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::ID,
32553            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::ID,
32554            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::ID,
32555            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::ID,
32556            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::ID,
32557            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::ID,
32558            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::ID,
32559            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::ID,
32560            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::ID,
32561            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::ID,
32562            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::ID,
32563            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
32564            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::ID,
32565            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::ID,
32566            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::ID,
32567            Self::CAN_FRAME(..) => CAN_FRAME_DATA::ID,
32568            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::ID,
32569            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::ID,
32570            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::ID,
32571            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
32572            Self::COLLISION(..) => COLLISION_DATA::ID,
32573            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::ID,
32574            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::ID,
32575            Self::COMMAND_INT(..) => COMMAND_INT_DATA::ID,
32576            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::ID,
32577            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::ID,
32578            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::ID,
32579            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::ID,
32580            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::ID,
32581            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::ID,
32582            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::ID,
32583            Self::DATA_STREAM(..) => DATA_STREAM_DATA::ID,
32584            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
32585            Self::DEBUG(..) => DEBUG_DATA::ID,
32586            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::ID,
32587            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::ID,
32588            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::ID,
32589            Self::EFI_STATUS(..) => EFI_STATUS_DATA::ID,
32590            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::ID,
32591            Self::ESC_INFO(..) => ESC_INFO_DATA::ID,
32592            Self::ESC_STATUS(..) => ESC_STATUS_DATA::ID,
32593            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::ID,
32594            Self::EVENT(..) => EVENT_DATA::ID,
32595            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::ID,
32596            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::ID,
32597            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::ID,
32598            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::ID,
32599            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::ID,
32600            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::ID,
32601            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::ID,
32602            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
32603            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::ID,
32604            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
32605            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::ID,
32606            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
32607            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
32608                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID
32609            }
32610            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
32611            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::ID,
32612            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::ID,
32613            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::ID,
32614            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
32615            Self::GPS2_RAW(..) => GPS2_RAW_DATA::ID,
32616            Self::GPS2_RTK(..) => GPS2_RTK_DATA::ID,
32617            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::ID,
32618            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::ID,
32619            Self::GPS_INPUT(..) => GPS_INPUT_DATA::ID,
32620            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::ID,
32621            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::ID,
32622            Self::GPS_RTK(..) => GPS_RTK_DATA::ID,
32623            Self::GPS_STATUS(..) => GPS_STATUS_DATA::ID,
32624            Self::HEARTBEAT(..) => HEARTBEAT_DATA::ID,
32625            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::ID,
32626            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::ID,
32627            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::ID,
32628            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::ID,
32629            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::ID,
32630            Self::HIL_GPS(..) => HIL_GPS_DATA::ID,
32631            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::ID,
32632            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::ID,
32633            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::ID,
32634            Self::HIL_STATE(..) => HIL_STATE_DATA::ID,
32635            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::ID,
32636            Self::HOME_POSITION(..) => HOME_POSITION_DATA::ID,
32637            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::ID,
32638            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::ID,
32639            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::ID,
32640            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::ID,
32641            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::ID,
32642            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::ID,
32643            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::ID,
32644            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
32645                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID
32646            }
32647            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::ID,
32648            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::ID,
32649            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::ID,
32650            Self::LOG_DATA(..) => LOG_DATA_DATA::ID,
32651            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::ID,
32652            Self::LOG_ERASE(..) => LOG_ERASE_DATA::ID,
32653            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::ID,
32654            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::ID,
32655            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::ID,
32656            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::ID,
32657            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::ID,
32658            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::ID,
32659            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::ID,
32660            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::ID,
32661            Self::MISSION_ACK(..) => MISSION_ACK_DATA::ID,
32662            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::ID,
32663            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::ID,
32664            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::ID,
32665            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::ID,
32666            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::ID,
32667            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::ID,
32668            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::ID,
32669            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::ID,
32670            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::ID,
32671            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
32672            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::ID,
32673            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::ID,
32674            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::ID,
32675            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::ID,
32676            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::ID,
32677            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::ID,
32678            Self::NAV_FILTER_BIAS(..) => NAV_FILTER_BIAS_DATA::ID,
32679            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::ID,
32680            Self::ODOMETRY(..) => ODOMETRY_DATA::ID,
32681            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::ID,
32682            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
32683            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
32684            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::ID,
32685            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::ID,
32686            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
32687            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
32688            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::ID,
32689            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::ID,
32690            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
32691            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::ID,
32692            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::ID,
32693            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::ID,
32694            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::ID,
32695            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::ID,
32696            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::ID,
32697            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::ID,
32698            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::ID,
32699            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::ID,
32700            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::ID,
32701            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::ID,
32702            Self::PARAM_SET(..) => PARAM_SET_DATA::ID,
32703            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::ID,
32704            Self::PING(..) => PING_DATA::ID,
32705            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::ID,
32706            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::ID,
32707            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::ID,
32708            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::ID,
32709            Self::POWER_STATUS(..) => POWER_STATUS_DATA::ID,
32710            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::ID,
32711            Self::RADIO_CALIBRATION(..) => RADIO_CALIBRATION_DATA::ID,
32712            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::ID,
32713            Self::RAW_IMU(..) => RAW_IMU_DATA::ID,
32714            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::ID,
32715            Self::RAW_RPM(..) => RAW_RPM_DATA::ID,
32716            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::ID,
32717            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::ID,
32718            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::ID,
32719            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::ID,
32720            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::ID,
32721            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::ID,
32722            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::ID,
32723            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::ID,
32724            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::ID,
32725            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::ID,
32726            Self::SCALED_IMU(..) => SCALED_IMU_DATA::ID,
32727            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::ID,
32728            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::ID,
32729            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::ID,
32730            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::ID,
32731            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::ID,
32732            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::ID,
32733            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::ID,
32734            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::ID,
32735            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
32736            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::ID,
32737            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::ID,
32738            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::ID,
32739            Self::SET_MODE(..) => SET_MODE_DATA::ID,
32740            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
32741            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
32742            Self::SIM_STATE(..) => SIM_STATE_DATA::ID,
32743            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::ID,
32744            Self::STATUSTEXT(..) => STATUSTEXT_DATA::ID,
32745            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::ID,
32746            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::ID,
32747            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::ID,
32748            Self::SYS_STATUS(..) => SYS_STATUS_DATA::ID,
32749            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::ID,
32750            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::ID,
32751            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::ID,
32752            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::ID,
32753            Self::TIMESYNC(..) => TIMESYNC_DATA::ID,
32754            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::ID,
32755            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
32756            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
32757                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID
32758            }
32759            Self::TUNNEL(..) => TUNNEL_DATA::ID,
32760            Self::UALBERTA_SYS_STATUS(..) => UALBERTA_SYS_STATUS_DATA::ID,
32761            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::ID,
32762            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::ID,
32763            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::ID,
32764            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::ID,
32765            Self::VFR_HUD(..) => VFR_HUD_DATA::ID,
32766            Self::VIBRATION(..) => VIBRATION_DATA::ID,
32767            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::ID,
32768            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::ID,
32769            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::ID,
32770            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::ID,
32771            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::ID,
32772            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::ID,
32773            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::ID,
32774            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::ID,
32775            Self::WIND_COV(..) => WIND_COV_DATA::ID,
32776        }
32777    }
32778    fn message_id_from_name(name: &str) -> Option<u32> {
32779        match name {
32780            ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(ACTUATOR_CONTROL_TARGET_DATA::ID),
32781            ACTUATOR_OUTPUT_STATUS_DATA::NAME => Some(ACTUATOR_OUTPUT_STATUS_DATA::ID),
32782            ADSB_VEHICLE_DATA::NAME => Some(ADSB_VEHICLE_DATA::ID),
32783            AIS_VESSEL_DATA::NAME => Some(AIS_VESSEL_DATA::ID),
32784            ALTITUDE_DATA::NAME => Some(ALTITUDE_DATA::ID),
32785            ATTITUDE_DATA::NAME => Some(ATTITUDE_DATA::ID),
32786            ATTITUDE_QUATERNION_DATA::NAME => Some(ATTITUDE_QUATERNION_DATA::ID),
32787            ATTITUDE_QUATERNION_COV_DATA::NAME => Some(ATTITUDE_QUATERNION_COV_DATA::ID),
32788            ATTITUDE_TARGET_DATA::NAME => Some(ATTITUDE_TARGET_DATA::ID),
32789            ATT_POS_MOCAP_DATA::NAME => Some(ATT_POS_MOCAP_DATA::ID),
32790            AUTH_KEY_DATA::NAME => Some(AUTH_KEY_DATA::ID),
32791            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME => {
32792                Some(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID)
32793            }
32794            AUTOPILOT_VERSION_DATA::NAME => Some(AUTOPILOT_VERSION_DATA::ID),
32795            AVAILABLE_MODES_DATA::NAME => Some(AVAILABLE_MODES_DATA::ID),
32796            AVAILABLE_MODES_MONITOR_DATA::NAME => Some(AVAILABLE_MODES_MONITOR_DATA::ID),
32797            BATTERY_INFO_DATA::NAME => Some(BATTERY_INFO_DATA::ID),
32798            BATTERY_STATUS_DATA::NAME => Some(BATTERY_STATUS_DATA::ID),
32799            BUTTON_CHANGE_DATA::NAME => Some(BUTTON_CHANGE_DATA::ID),
32800            CAMERA_CAPTURE_STATUS_DATA::NAME => Some(CAMERA_CAPTURE_STATUS_DATA::ID),
32801            CAMERA_FOV_STATUS_DATA::NAME => Some(CAMERA_FOV_STATUS_DATA::ID),
32802            CAMERA_IMAGE_CAPTURED_DATA::NAME => Some(CAMERA_IMAGE_CAPTURED_DATA::ID),
32803            CAMERA_INFORMATION_DATA::NAME => Some(CAMERA_INFORMATION_DATA::ID),
32804            CAMERA_SETTINGS_DATA::NAME => Some(CAMERA_SETTINGS_DATA::ID),
32805            CAMERA_THERMAL_RANGE_DATA::NAME => Some(CAMERA_THERMAL_RANGE_DATA::ID),
32806            CAMERA_TRACKING_GEO_STATUS_DATA::NAME => Some(CAMERA_TRACKING_GEO_STATUS_DATA::ID),
32807            CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME => Some(CAMERA_TRACKING_IMAGE_STATUS_DATA::ID),
32808            CAMERA_TRIGGER_DATA::NAME => Some(CAMERA_TRIGGER_DATA::ID),
32809            CANFD_FRAME_DATA::NAME => Some(CANFD_FRAME_DATA::ID),
32810            CAN_FILTER_MODIFY_DATA::NAME => Some(CAN_FILTER_MODIFY_DATA::ID),
32811            CAN_FRAME_DATA::NAME => Some(CAN_FRAME_DATA::ID),
32812            CELLULAR_CONFIG_DATA::NAME => Some(CELLULAR_CONFIG_DATA::ID),
32813            CELLULAR_STATUS_DATA::NAME => Some(CELLULAR_STATUS_DATA::ID),
32814            CHANGE_OPERATOR_CONTROL_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_DATA::ID),
32815            CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_ACK_DATA::ID),
32816            COLLISION_DATA::NAME => Some(COLLISION_DATA::ID),
32817            COMMAND_ACK_DATA::NAME => Some(COMMAND_ACK_DATA::ID),
32818            COMMAND_CANCEL_DATA::NAME => Some(COMMAND_CANCEL_DATA::ID),
32819            COMMAND_INT_DATA::NAME => Some(COMMAND_INT_DATA::ID),
32820            COMMAND_LONG_DATA::NAME => Some(COMMAND_LONG_DATA::ID),
32821            COMPONENT_INFORMATION_DATA::NAME => Some(COMPONENT_INFORMATION_DATA::ID),
32822            COMPONENT_INFORMATION_BASIC_DATA::NAME => Some(COMPONENT_INFORMATION_BASIC_DATA::ID),
32823            COMPONENT_METADATA_DATA::NAME => Some(COMPONENT_METADATA_DATA::ID),
32824            CONTROL_SYSTEM_STATE_DATA::NAME => Some(CONTROL_SYSTEM_STATE_DATA::ID),
32825            CURRENT_EVENT_SEQUENCE_DATA::NAME => Some(CURRENT_EVENT_SEQUENCE_DATA::ID),
32826            CURRENT_MODE_DATA::NAME => Some(CURRENT_MODE_DATA::ID),
32827            DATA_STREAM_DATA::NAME => Some(DATA_STREAM_DATA::ID),
32828            DATA_TRANSMISSION_HANDSHAKE_DATA::NAME => Some(DATA_TRANSMISSION_HANDSHAKE_DATA::ID),
32829            DEBUG_DATA::NAME => Some(DEBUG_DATA::ID),
32830            DEBUG_FLOAT_ARRAY_DATA::NAME => Some(DEBUG_FLOAT_ARRAY_DATA::ID),
32831            DEBUG_VECT_DATA::NAME => Some(DEBUG_VECT_DATA::ID),
32832            DISTANCE_SENSOR_DATA::NAME => Some(DISTANCE_SENSOR_DATA::ID),
32833            EFI_STATUS_DATA::NAME => Some(EFI_STATUS_DATA::ID),
32834            ENCAPSULATED_DATA_DATA::NAME => Some(ENCAPSULATED_DATA_DATA::ID),
32835            ESC_INFO_DATA::NAME => Some(ESC_INFO_DATA::ID),
32836            ESC_STATUS_DATA::NAME => Some(ESC_STATUS_DATA::ID),
32837            ESTIMATOR_STATUS_DATA::NAME => Some(ESTIMATOR_STATUS_DATA::ID),
32838            EVENT_DATA::NAME => Some(EVENT_DATA::ID),
32839            EXTENDED_SYS_STATE_DATA::NAME => Some(EXTENDED_SYS_STATE_DATA::ID),
32840            FENCE_STATUS_DATA::NAME => Some(FENCE_STATUS_DATA::ID),
32841            FILE_TRANSFER_PROTOCOL_DATA::NAME => Some(FILE_TRANSFER_PROTOCOL_DATA::ID),
32842            FLIGHT_INFORMATION_DATA::NAME => Some(FLIGHT_INFORMATION_DATA::ID),
32843            FOLLOW_TARGET_DATA::NAME => Some(FOLLOW_TARGET_DATA::ID),
32844            FUEL_STATUS_DATA::NAME => Some(FUEL_STATUS_DATA::ID),
32845            GENERATOR_STATUS_DATA::NAME => Some(GENERATOR_STATUS_DATA::ID),
32846            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME => {
32847                Some(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID)
32848            }
32849            GIMBAL_DEVICE_INFORMATION_DATA::NAME => Some(GIMBAL_DEVICE_INFORMATION_DATA::ID),
32850            GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID),
32851            GIMBAL_MANAGER_INFORMATION_DATA::NAME => Some(GIMBAL_MANAGER_INFORMATION_DATA::ID),
32852            GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID),
32853            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME => {
32854                Some(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID)
32855            }
32856            GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME => Some(GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID),
32857            GIMBAL_MANAGER_STATUS_DATA::NAME => Some(GIMBAL_MANAGER_STATUS_DATA::ID),
32858            GLOBAL_POSITION_INT_DATA::NAME => Some(GLOBAL_POSITION_INT_DATA::ID),
32859            GLOBAL_POSITION_INT_COV_DATA::NAME => Some(GLOBAL_POSITION_INT_COV_DATA::ID),
32860            GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME => {
32861                Some(GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID)
32862            }
32863            GPS2_RAW_DATA::NAME => Some(GPS2_RAW_DATA::ID),
32864            GPS2_RTK_DATA::NAME => Some(GPS2_RTK_DATA::ID),
32865            GPS_GLOBAL_ORIGIN_DATA::NAME => Some(GPS_GLOBAL_ORIGIN_DATA::ID),
32866            GPS_INJECT_DATA_DATA::NAME => Some(GPS_INJECT_DATA_DATA::ID),
32867            GPS_INPUT_DATA::NAME => Some(GPS_INPUT_DATA::ID),
32868            GPS_RAW_INT_DATA::NAME => Some(GPS_RAW_INT_DATA::ID),
32869            GPS_RTCM_DATA_DATA::NAME => Some(GPS_RTCM_DATA_DATA::ID),
32870            GPS_RTK_DATA::NAME => Some(GPS_RTK_DATA::ID),
32871            GPS_STATUS_DATA::NAME => Some(GPS_STATUS_DATA::ID),
32872            HEARTBEAT_DATA::NAME => Some(HEARTBEAT_DATA::ID),
32873            HIGHRES_IMU_DATA::NAME => Some(HIGHRES_IMU_DATA::ID),
32874            HIGH_LATENCY_DATA::NAME => Some(HIGH_LATENCY_DATA::ID),
32875            HIGH_LATENCY2_DATA::NAME => Some(HIGH_LATENCY2_DATA::ID),
32876            HIL_ACTUATOR_CONTROLS_DATA::NAME => Some(HIL_ACTUATOR_CONTROLS_DATA::ID),
32877            HIL_CONTROLS_DATA::NAME => Some(HIL_CONTROLS_DATA::ID),
32878            HIL_GPS_DATA::NAME => Some(HIL_GPS_DATA::ID),
32879            HIL_OPTICAL_FLOW_DATA::NAME => Some(HIL_OPTICAL_FLOW_DATA::ID),
32880            HIL_RC_INPUTS_RAW_DATA::NAME => Some(HIL_RC_INPUTS_RAW_DATA::ID),
32881            HIL_SENSOR_DATA::NAME => Some(HIL_SENSOR_DATA::ID),
32882            HIL_STATE_DATA::NAME => Some(HIL_STATE_DATA::ID),
32883            HIL_STATE_QUATERNION_DATA::NAME => Some(HIL_STATE_QUATERNION_DATA::ID),
32884            HOME_POSITION_DATA::NAME => Some(HOME_POSITION_DATA::ID),
32885            HYGROMETER_SENSOR_DATA::NAME => Some(HYGROMETER_SENSOR_DATA::ID),
32886            ILLUMINATOR_STATUS_DATA::NAME => Some(ILLUMINATOR_STATUS_DATA::ID),
32887            ISBD_LINK_STATUS_DATA::NAME => Some(ISBD_LINK_STATUS_DATA::ID),
32888            LANDING_TARGET_DATA::NAME => Some(LANDING_TARGET_DATA::ID),
32889            LINK_NODE_STATUS_DATA::NAME => Some(LINK_NODE_STATUS_DATA::ID),
32890            LOCAL_POSITION_NED_DATA::NAME => Some(LOCAL_POSITION_NED_DATA::ID),
32891            LOCAL_POSITION_NED_COV_DATA::NAME => Some(LOCAL_POSITION_NED_COV_DATA::ID),
32892            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME => {
32893                Some(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID)
32894            }
32895            LOGGING_ACK_DATA::NAME => Some(LOGGING_ACK_DATA::ID),
32896            LOGGING_DATA_DATA::NAME => Some(LOGGING_DATA_DATA::ID),
32897            LOGGING_DATA_ACKED_DATA::NAME => Some(LOGGING_DATA_ACKED_DATA::ID),
32898            LOG_DATA_DATA::NAME => Some(LOG_DATA_DATA::ID),
32899            LOG_ENTRY_DATA::NAME => Some(LOG_ENTRY_DATA::ID),
32900            LOG_ERASE_DATA::NAME => Some(LOG_ERASE_DATA::ID),
32901            LOG_REQUEST_DATA_DATA::NAME => Some(LOG_REQUEST_DATA_DATA::ID),
32902            LOG_REQUEST_END_DATA::NAME => Some(LOG_REQUEST_END_DATA::ID),
32903            LOG_REQUEST_LIST_DATA::NAME => Some(LOG_REQUEST_LIST_DATA::ID),
32904            MAG_CAL_REPORT_DATA::NAME => Some(MAG_CAL_REPORT_DATA::ID),
32905            MANUAL_CONTROL_DATA::NAME => Some(MANUAL_CONTROL_DATA::ID),
32906            MANUAL_SETPOINT_DATA::NAME => Some(MANUAL_SETPOINT_DATA::ID),
32907            MEMORY_VECT_DATA::NAME => Some(MEMORY_VECT_DATA::ID),
32908            MESSAGE_INTERVAL_DATA::NAME => Some(MESSAGE_INTERVAL_DATA::ID),
32909            MISSION_ACK_DATA::NAME => Some(MISSION_ACK_DATA::ID),
32910            MISSION_CLEAR_ALL_DATA::NAME => Some(MISSION_CLEAR_ALL_DATA::ID),
32911            MISSION_COUNT_DATA::NAME => Some(MISSION_COUNT_DATA::ID),
32912            MISSION_CURRENT_DATA::NAME => Some(MISSION_CURRENT_DATA::ID),
32913            MISSION_ITEM_DATA::NAME => Some(MISSION_ITEM_DATA::ID),
32914            MISSION_ITEM_INT_DATA::NAME => Some(MISSION_ITEM_INT_DATA::ID),
32915            MISSION_ITEM_REACHED_DATA::NAME => Some(MISSION_ITEM_REACHED_DATA::ID),
32916            MISSION_REQUEST_DATA::NAME => Some(MISSION_REQUEST_DATA::ID),
32917            MISSION_REQUEST_INT_DATA::NAME => Some(MISSION_REQUEST_INT_DATA::ID),
32918            MISSION_REQUEST_LIST_DATA::NAME => Some(MISSION_REQUEST_LIST_DATA::ID),
32919            MISSION_REQUEST_PARTIAL_LIST_DATA::NAME => Some(MISSION_REQUEST_PARTIAL_LIST_DATA::ID),
32920            MISSION_SET_CURRENT_DATA::NAME => Some(MISSION_SET_CURRENT_DATA::ID),
32921            MISSION_WRITE_PARTIAL_LIST_DATA::NAME => Some(MISSION_WRITE_PARTIAL_LIST_DATA::ID),
32922            MOUNT_ORIENTATION_DATA::NAME => Some(MOUNT_ORIENTATION_DATA::ID),
32923            NAMED_VALUE_FLOAT_DATA::NAME => Some(NAMED_VALUE_FLOAT_DATA::ID),
32924            NAMED_VALUE_INT_DATA::NAME => Some(NAMED_VALUE_INT_DATA::ID),
32925            NAV_CONTROLLER_OUTPUT_DATA::NAME => Some(NAV_CONTROLLER_OUTPUT_DATA::ID),
32926            NAV_FILTER_BIAS_DATA::NAME => Some(NAV_FILTER_BIAS_DATA::ID),
32927            OBSTACLE_DISTANCE_DATA::NAME => Some(OBSTACLE_DISTANCE_DATA::ID),
32928            ODOMETRY_DATA::NAME => Some(ODOMETRY_DATA::ID),
32929            ONBOARD_COMPUTER_STATUS_DATA::NAME => Some(ONBOARD_COMPUTER_STATUS_DATA::ID),
32930            OPEN_DRONE_ID_ARM_STATUS_DATA::NAME => Some(OPEN_DRONE_ID_ARM_STATUS_DATA::ID),
32931            OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME => Some(OPEN_DRONE_ID_AUTHENTICATION_DATA::ID),
32932            OPEN_DRONE_ID_BASIC_ID_DATA::NAME => Some(OPEN_DRONE_ID_BASIC_ID_DATA::ID),
32933            OPEN_DRONE_ID_LOCATION_DATA::NAME => Some(OPEN_DRONE_ID_LOCATION_DATA::ID),
32934            OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME => Some(OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID),
32935            OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME => Some(OPEN_DRONE_ID_OPERATOR_ID_DATA::ID),
32936            OPEN_DRONE_ID_SELF_ID_DATA::NAME => Some(OPEN_DRONE_ID_SELF_ID_DATA::ID),
32937            OPEN_DRONE_ID_SYSTEM_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_DATA::ID),
32938            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID),
32939            OPTICAL_FLOW_DATA::NAME => Some(OPTICAL_FLOW_DATA::ID),
32940            OPTICAL_FLOW_RAD_DATA::NAME => Some(OPTICAL_FLOW_RAD_DATA::ID),
32941            ORBIT_EXECUTION_STATUS_DATA::NAME => Some(ORBIT_EXECUTION_STATUS_DATA::ID),
32942            PARAM_EXT_ACK_DATA::NAME => Some(PARAM_EXT_ACK_DATA::ID),
32943            PARAM_EXT_REQUEST_LIST_DATA::NAME => Some(PARAM_EXT_REQUEST_LIST_DATA::ID),
32944            PARAM_EXT_REQUEST_READ_DATA::NAME => Some(PARAM_EXT_REQUEST_READ_DATA::ID),
32945            PARAM_EXT_SET_DATA::NAME => Some(PARAM_EXT_SET_DATA::ID),
32946            PARAM_EXT_VALUE_DATA::NAME => Some(PARAM_EXT_VALUE_DATA::ID),
32947            PARAM_MAP_RC_DATA::NAME => Some(PARAM_MAP_RC_DATA::ID),
32948            PARAM_REQUEST_LIST_DATA::NAME => Some(PARAM_REQUEST_LIST_DATA::ID),
32949            PARAM_REQUEST_READ_DATA::NAME => Some(PARAM_REQUEST_READ_DATA::ID),
32950            PARAM_SET_DATA::NAME => Some(PARAM_SET_DATA::ID),
32951            PARAM_VALUE_DATA::NAME => Some(PARAM_VALUE_DATA::ID),
32952            PING_DATA::NAME => Some(PING_DATA::ID),
32953            PLAY_TUNE_DATA::NAME => Some(PLAY_TUNE_DATA::ID),
32954            PLAY_TUNE_V2_DATA::NAME => Some(PLAY_TUNE_V2_DATA::ID),
32955            POSITION_TARGET_GLOBAL_INT_DATA::NAME => Some(POSITION_TARGET_GLOBAL_INT_DATA::ID),
32956            POSITION_TARGET_LOCAL_NED_DATA::NAME => Some(POSITION_TARGET_LOCAL_NED_DATA::ID),
32957            POWER_STATUS_DATA::NAME => Some(POWER_STATUS_DATA::ID),
32958            PROTOCOL_VERSION_DATA::NAME => Some(PROTOCOL_VERSION_DATA::ID),
32959            RADIO_CALIBRATION_DATA::NAME => Some(RADIO_CALIBRATION_DATA::ID),
32960            RADIO_STATUS_DATA::NAME => Some(RADIO_STATUS_DATA::ID),
32961            RAW_IMU_DATA::NAME => Some(RAW_IMU_DATA::ID),
32962            RAW_PRESSURE_DATA::NAME => Some(RAW_PRESSURE_DATA::ID),
32963            RAW_RPM_DATA::NAME => Some(RAW_RPM_DATA::ID),
32964            RC_CHANNELS_DATA::NAME => Some(RC_CHANNELS_DATA::ID),
32965            RC_CHANNELS_OVERRIDE_DATA::NAME => Some(RC_CHANNELS_OVERRIDE_DATA::ID),
32966            RC_CHANNELS_RAW_DATA::NAME => Some(RC_CHANNELS_RAW_DATA::ID),
32967            RC_CHANNELS_SCALED_DATA::NAME => Some(RC_CHANNELS_SCALED_DATA::ID),
32968            REQUEST_DATA_STREAM_DATA::NAME => Some(REQUEST_DATA_STREAM_DATA::ID),
32969            REQUEST_EVENT_DATA::NAME => Some(REQUEST_EVENT_DATA::ID),
32970            RESOURCE_REQUEST_DATA::NAME => Some(RESOURCE_REQUEST_DATA::ID),
32971            RESPONSE_EVENT_ERROR_DATA::NAME => Some(RESPONSE_EVENT_ERROR_DATA::ID),
32972            SAFETY_ALLOWED_AREA_DATA::NAME => Some(SAFETY_ALLOWED_AREA_DATA::ID),
32973            SAFETY_SET_ALLOWED_AREA_DATA::NAME => Some(SAFETY_SET_ALLOWED_AREA_DATA::ID),
32974            SCALED_IMU_DATA::NAME => Some(SCALED_IMU_DATA::ID),
32975            SCALED_IMU2_DATA::NAME => Some(SCALED_IMU2_DATA::ID),
32976            SCALED_IMU3_DATA::NAME => Some(SCALED_IMU3_DATA::ID),
32977            SCALED_PRESSURE_DATA::NAME => Some(SCALED_PRESSURE_DATA::ID),
32978            SCALED_PRESSURE2_DATA::NAME => Some(SCALED_PRESSURE2_DATA::ID),
32979            SCALED_PRESSURE3_DATA::NAME => Some(SCALED_PRESSURE3_DATA::ID),
32980            SERIAL_CONTROL_DATA::NAME => Some(SERIAL_CONTROL_DATA::ID),
32981            SERVO_OUTPUT_RAW_DATA::NAME => Some(SERVO_OUTPUT_RAW_DATA::ID),
32982            SETUP_SIGNING_DATA::NAME => Some(SETUP_SIGNING_DATA::ID),
32983            SET_ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(SET_ACTUATOR_CONTROL_TARGET_DATA::ID),
32984            SET_ATTITUDE_TARGET_DATA::NAME => Some(SET_ATTITUDE_TARGET_DATA::ID),
32985            SET_GPS_GLOBAL_ORIGIN_DATA::NAME => Some(SET_GPS_GLOBAL_ORIGIN_DATA::ID),
32986            SET_HOME_POSITION_DATA::NAME => Some(SET_HOME_POSITION_DATA::ID),
32987            SET_MODE_DATA::NAME => Some(SET_MODE_DATA::ID),
32988            SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME => {
32989                Some(SET_POSITION_TARGET_GLOBAL_INT_DATA::ID)
32990            }
32991            SET_POSITION_TARGET_LOCAL_NED_DATA::NAME => {
32992                Some(SET_POSITION_TARGET_LOCAL_NED_DATA::ID)
32993            }
32994            SIM_STATE_DATA::NAME => Some(SIM_STATE_DATA::ID),
32995            SMART_BATTERY_INFO_DATA::NAME => Some(SMART_BATTERY_INFO_DATA::ID),
32996            STATUSTEXT_DATA::NAME => Some(STATUSTEXT_DATA::ID),
32997            STORAGE_INFORMATION_DATA::NAME => Some(STORAGE_INFORMATION_DATA::ID),
32998            SUPPORTED_TUNES_DATA::NAME => Some(SUPPORTED_TUNES_DATA::ID),
32999            SYSTEM_TIME_DATA::NAME => Some(SYSTEM_TIME_DATA::ID),
33000            SYS_STATUS_DATA::NAME => Some(SYS_STATUS_DATA::ID),
33001            TERRAIN_CHECK_DATA::NAME => Some(TERRAIN_CHECK_DATA::ID),
33002            TERRAIN_DATA_DATA::NAME => Some(TERRAIN_DATA_DATA::ID),
33003            TERRAIN_REPORT_DATA::NAME => Some(TERRAIN_REPORT_DATA::ID),
33004            TERRAIN_REQUEST_DATA::NAME => Some(TERRAIN_REQUEST_DATA::ID),
33005            TIMESYNC_DATA::NAME => Some(TIMESYNC_DATA::ID),
33006            TIME_ESTIMATE_TO_TARGET_DATA::NAME => Some(TIME_ESTIMATE_TO_TARGET_DATA::ID),
33007            TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME => {
33008                Some(TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID)
33009            }
33010            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME => {
33011                Some(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID)
33012            }
33013            TUNNEL_DATA::NAME => Some(TUNNEL_DATA::ID),
33014            UALBERTA_SYS_STATUS_DATA::NAME => Some(UALBERTA_SYS_STATUS_DATA::ID),
33015            UAVCAN_NODE_INFO_DATA::NAME => Some(UAVCAN_NODE_INFO_DATA::ID),
33016            UAVCAN_NODE_STATUS_DATA::NAME => Some(UAVCAN_NODE_STATUS_DATA::ID),
33017            UTM_GLOBAL_POSITION_DATA::NAME => Some(UTM_GLOBAL_POSITION_DATA::ID),
33018            V2_EXTENSION_DATA::NAME => Some(V2_EXTENSION_DATA::ID),
33019            VFR_HUD_DATA::NAME => Some(VFR_HUD_DATA::ID),
33020            VIBRATION_DATA::NAME => Some(VIBRATION_DATA::ID),
33021            VICON_POSITION_ESTIMATE_DATA::NAME => Some(VICON_POSITION_ESTIMATE_DATA::ID),
33022            VIDEO_STREAM_INFORMATION_DATA::NAME => Some(VIDEO_STREAM_INFORMATION_DATA::ID),
33023            VIDEO_STREAM_STATUS_DATA::NAME => Some(VIDEO_STREAM_STATUS_DATA::ID),
33024            VISION_POSITION_ESTIMATE_DATA::NAME => Some(VISION_POSITION_ESTIMATE_DATA::ID),
33025            VISION_SPEED_ESTIMATE_DATA::NAME => Some(VISION_SPEED_ESTIMATE_DATA::ID),
33026            WHEEL_DISTANCE_DATA::NAME => Some(WHEEL_DISTANCE_DATA::ID),
33027            WIFI_CONFIG_AP_DATA::NAME => Some(WIFI_CONFIG_AP_DATA::ID),
33028            WINCH_STATUS_DATA::NAME => Some(WINCH_STATUS_DATA::ID),
33029            WIND_COV_DATA::NAME => Some(WIND_COV_DATA::ID),
33030            _ => None,
33031        }
33032    }
33033    fn default_message_from_id(id: u32) -> Option<Self> {
33034        match id {
33035            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
33036                ACTUATOR_CONTROL_TARGET_DATA::default(),
33037            )),
33038            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
33039                ACTUATOR_OUTPUT_STATUS_DATA::default(),
33040            )),
33041            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::default())),
33042            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::default())),
33043            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::default())),
33044            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::default())),
33045            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
33046                ATTITUDE_QUATERNION_DATA::default(),
33047            )),
33048            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
33049                ATTITUDE_QUATERNION_COV_DATA::default(),
33050            )),
33051            ATTITUDE_TARGET_DATA::ID => {
33052                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::default()))
33053            }
33054            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::default())),
33055            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::default())),
33056            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
33057                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
33058                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::default(),
33059                ))
33060            }
33061            AUTOPILOT_VERSION_DATA::ID => {
33062                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::default()))
33063            }
33064            AVAILABLE_MODES_DATA::ID => {
33065                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::default()))
33066            }
33067            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
33068                AVAILABLE_MODES_MONITOR_DATA::default(),
33069            )),
33070            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::default())),
33071            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::default())),
33072            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::default())),
33073            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
33074                CAMERA_CAPTURE_STATUS_DATA::default(),
33075            )),
33076            CAMERA_FOV_STATUS_DATA::ID => {
33077                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::default()))
33078            }
33079            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
33080                CAMERA_IMAGE_CAPTURED_DATA::default(),
33081            )),
33082            CAMERA_INFORMATION_DATA::ID => {
33083                Some(Self::CAMERA_INFORMATION(CAMERA_INFORMATION_DATA::default()))
33084            }
33085            CAMERA_SETTINGS_DATA::ID => {
33086                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::default()))
33087            }
33088            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
33089                CAMERA_THERMAL_RANGE_DATA::default(),
33090            )),
33091            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
33092                CAMERA_TRACKING_GEO_STATUS_DATA::default(),
33093            )),
33094            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
33095                CAMERA_TRACKING_IMAGE_STATUS_DATA::default(),
33096            )),
33097            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::default())),
33098            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::default())),
33099            CAN_FILTER_MODIFY_DATA::ID => {
33100                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::default()))
33101            }
33102            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::default())),
33103            CELLULAR_CONFIG_DATA::ID => {
33104                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::default()))
33105            }
33106            CELLULAR_STATUS_DATA::ID => {
33107                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::default()))
33108            }
33109            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
33110                CHANGE_OPERATOR_CONTROL_DATA::default(),
33111            )),
33112            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
33113                CHANGE_OPERATOR_CONTROL_ACK_DATA::default(),
33114            )),
33115            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::default())),
33116            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::default())),
33117            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::default())),
33118            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::default())),
33119            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::default())),
33120            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
33121                COMPONENT_INFORMATION_DATA::default(),
33122            )),
33123            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
33124                COMPONENT_INFORMATION_BASIC_DATA::default(),
33125            )),
33126            COMPONENT_METADATA_DATA::ID => {
33127                Some(Self::COMPONENT_METADATA(COMPONENT_METADATA_DATA::default()))
33128            }
33129            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
33130                CONTROL_SYSTEM_STATE_DATA::default(),
33131            )),
33132            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
33133                CURRENT_EVENT_SEQUENCE_DATA::default(),
33134            )),
33135            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::default())),
33136            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::default())),
33137            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
33138                DATA_TRANSMISSION_HANDSHAKE_DATA::default(),
33139            )),
33140            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::default())),
33141            DEBUG_FLOAT_ARRAY_DATA::ID => {
33142                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::default()))
33143            }
33144            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::default())),
33145            DISTANCE_SENSOR_DATA::ID => {
33146                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::default()))
33147            }
33148            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::default())),
33149            ENCAPSULATED_DATA_DATA::ID => {
33150                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::default()))
33151            }
33152            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::default())),
33153            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::default())),
33154            ESTIMATOR_STATUS_DATA::ID => {
33155                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::default()))
33156            }
33157            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::default())),
33158            EXTENDED_SYS_STATE_DATA::ID => {
33159                Some(Self::EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA::default()))
33160            }
33161            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::default())),
33162            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
33163                FILE_TRANSFER_PROTOCOL_DATA::default(),
33164            )),
33165            FLIGHT_INFORMATION_DATA::ID => {
33166                Some(Self::FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA::default()))
33167            }
33168            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::default())),
33169            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::default())),
33170            GENERATOR_STATUS_DATA::ID => {
33171                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::default()))
33172            }
33173            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
33174                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::default(),
33175            )),
33176            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
33177                GIMBAL_DEVICE_INFORMATION_DATA::default(),
33178            )),
33179            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
33180                GIMBAL_DEVICE_SET_ATTITUDE_DATA::default(),
33181            )),
33182            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
33183                GIMBAL_MANAGER_INFORMATION_DATA::default(),
33184            )),
33185            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
33186                GIMBAL_MANAGER_SET_ATTITUDE_DATA::default(),
33187            )),
33188            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
33189                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
33190                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::default(),
33191                ))
33192            }
33193            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
33194                GIMBAL_MANAGER_SET_PITCHYAW_DATA::default(),
33195            )),
33196            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
33197                GIMBAL_MANAGER_STATUS_DATA::default(),
33198            )),
33199            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
33200                GLOBAL_POSITION_INT_DATA::default(),
33201            )),
33202            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
33203                GLOBAL_POSITION_INT_COV_DATA::default(),
33204            )),
33205            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
33206                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
33207                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::default(),
33208                ))
33209            }
33210            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::default())),
33211            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::default())),
33212            GPS_GLOBAL_ORIGIN_DATA::ID => {
33213                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::default()))
33214            }
33215            GPS_INJECT_DATA_DATA::ID => {
33216                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::default()))
33217            }
33218            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::default())),
33219            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::default())),
33220            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::default())),
33221            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::default())),
33222            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::default())),
33223            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::default())),
33224            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::default())),
33225            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::default())),
33226            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::default())),
33227            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
33228                HIL_ACTUATOR_CONTROLS_DATA::default(),
33229            )),
33230            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::default())),
33231            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::default())),
33232            HIL_OPTICAL_FLOW_DATA::ID => {
33233                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::default()))
33234            }
33235            HIL_RC_INPUTS_RAW_DATA::ID => {
33236                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::default()))
33237            }
33238            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::default())),
33239            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::default())),
33240            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
33241                HIL_STATE_QUATERNION_DATA::default(),
33242            )),
33243            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::default())),
33244            HYGROMETER_SENSOR_DATA::ID => {
33245                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::default()))
33246            }
33247            ILLUMINATOR_STATUS_DATA::ID => {
33248                Some(Self::ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA::default()))
33249            }
33250            ISBD_LINK_STATUS_DATA::ID => {
33251                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::default()))
33252            }
33253            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::default())),
33254            LINK_NODE_STATUS_DATA::ID => {
33255                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::default()))
33256            }
33257            LOCAL_POSITION_NED_DATA::ID => {
33258                Some(Self::LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA::default()))
33259            }
33260            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
33261                LOCAL_POSITION_NED_COV_DATA::default(),
33262            )),
33263            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
33264                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
33265                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::default(),
33266                ))
33267            }
33268            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::default())),
33269            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::default())),
33270            LOGGING_DATA_ACKED_DATA::ID => {
33271                Some(Self::LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA::default()))
33272            }
33273            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::default())),
33274            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::default())),
33275            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::default())),
33276            LOG_REQUEST_DATA_DATA::ID => {
33277                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::default()))
33278            }
33279            LOG_REQUEST_END_DATA::ID => {
33280                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::default()))
33281            }
33282            LOG_REQUEST_LIST_DATA::ID => {
33283                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::default()))
33284            }
33285            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::default())),
33286            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::default())),
33287            MANUAL_SETPOINT_DATA::ID => {
33288                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::default()))
33289            }
33290            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::default())),
33291            MESSAGE_INTERVAL_DATA::ID => {
33292                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::default()))
33293            }
33294            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::default())),
33295            MISSION_CLEAR_ALL_DATA::ID => {
33296                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::default()))
33297            }
33298            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::default())),
33299            MISSION_CURRENT_DATA::ID => {
33300                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::default()))
33301            }
33302            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::default())),
33303            MISSION_ITEM_INT_DATA::ID => {
33304                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::default()))
33305            }
33306            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
33307                MISSION_ITEM_REACHED_DATA::default(),
33308            )),
33309            MISSION_REQUEST_DATA::ID => {
33310                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::default()))
33311            }
33312            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
33313                MISSION_REQUEST_INT_DATA::default(),
33314            )),
33315            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
33316                MISSION_REQUEST_LIST_DATA::default(),
33317            )),
33318            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
33319                MISSION_REQUEST_PARTIAL_LIST_DATA::default(),
33320            )),
33321            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
33322                MISSION_SET_CURRENT_DATA::default(),
33323            )),
33324            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
33325                MISSION_WRITE_PARTIAL_LIST_DATA::default(),
33326            )),
33327            MOUNT_ORIENTATION_DATA::ID => {
33328                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::default()))
33329            }
33330            NAMED_VALUE_FLOAT_DATA::ID => {
33331                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::default()))
33332            }
33333            NAMED_VALUE_INT_DATA::ID => {
33334                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::default()))
33335            }
33336            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
33337                NAV_CONTROLLER_OUTPUT_DATA::default(),
33338            )),
33339            NAV_FILTER_BIAS_DATA::ID => {
33340                Some(Self::NAV_FILTER_BIAS(NAV_FILTER_BIAS_DATA::default()))
33341            }
33342            OBSTACLE_DISTANCE_DATA::ID => {
33343                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::default()))
33344            }
33345            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::default())),
33346            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
33347                ONBOARD_COMPUTER_STATUS_DATA::default(),
33348            )),
33349            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
33350                OPEN_DRONE_ID_ARM_STATUS_DATA::default(),
33351            )),
33352            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
33353                OPEN_DRONE_ID_AUTHENTICATION_DATA::default(),
33354            )),
33355            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
33356                OPEN_DRONE_ID_BASIC_ID_DATA::default(),
33357            )),
33358            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
33359                OPEN_DRONE_ID_LOCATION_DATA::default(),
33360            )),
33361            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
33362                OPEN_DRONE_ID_MESSAGE_PACK_DATA::default(),
33363            )),
33364            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
33365                OPEN_DRONE_ID_OPERATOR_ID_DATA::default(),
33366            )),
33367            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
33368                OPEN_DRONE_ID_SELF_ID_DATA::default(),
33369            )),
33370            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
33371                OPEN_DRONE_ID_SYSTEM_DATA::default(),
33372            )),
33373            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
33374                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::default(),
33375            )),
33376            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::default())),
33377            OPTICAL_FLOW_RAD_DATA::ID => {
33378                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::default()))
33379            }
33380            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
33381                ORBIT_EXECUTION_STATUS_DATA::default(),
33382            )),
33383            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::default())),
33384            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
33385                PARAM_EXT_REQUEST_LIST_DATA::default(),
33386            )),
33387            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
33388                PARAM_EXT_REQUEST_READ_DATA::default(),
33389            )),
33390            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::default())),
33391            PARAM_EXT_VALUE_DATA::ID => {
33392                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::default()))
33393            }
33394            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::default())),
33395            PARAM_REQUEST_LIST_DATA::ID => {
33396                Some(Self::PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA::default()))
33397            }
33398            PARAM_REQUEST_READ_DATA::ID => {
33399                Some(Self::PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA::default()))
33400            }
33401            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::default())),
33402            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::default())),
33403            PING_DATA::ID => Some(Self::PING(PING_DATA::default())),
33404            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::default())),
33405            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::default())),
33406            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
33407                POSITION_TARGET_GLOBAL_INT_DATA::default(),
33408            )),
33409            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
33410                POSITION_TARGET_LOCAL_NED_DATA::default(),
33411            )),
33412            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::default())),
33413            PROTOCOL_VERSION_DATA::ID => {
33414                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::default()))
33415            }
33416            RADIO_CALIBRATION_DATA::ID => {
33417                Some(Self::RADIO_CALIBRATION(RADIO_CALIBRATION_DATA::default()))
33418            }
33419            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::default())),
33420            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::default())),
33421            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::default())),
33422            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::default())),
33423            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::default())),
33424            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
33425                RC_CHANNELS_OVERRIDE_DATA::default(),
33426            )),
33427            RC_CHANNELS_RAW_DATA::ID => {
33428                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::default()))
33429            }
33430            RC_CHANNELS_SCALED_DATA::ID => {
33431                Some(Self::RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA::default()))
33432            }
33433            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
33434                REQUEST_DATA_STREAM_DATA::default(),
33435            )),
33436            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::default())),
33437            RESOURCE_REQUEST_DATA::ID => {
33438                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::default()))
33439            }
33440            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
33441                RESPONSE_EVENT_ERROR_DATA::default(),
33442            )),
33443            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
33444                SAFETY_ALLOWED_AREA_DATA::default(),
33445            )),
33446            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
33447                SAFETY_SET_ALLOWED_AREA_DATA::default(),
33448            )),
33449            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::default())),
33450            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::default())),
33451            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::default())),
33452            SCALED_PRESSURE_DATA::ID => {
33453                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::default()))
33454            }
33455            SCALED_PRESSURE2_DATA::ID => {
33456                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::default()))
33457            }
33458            SCALED_PRESSURE3_DATA::ID => {
33459                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::default()))
33460            }
33461            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::default())),
33462            SERVO_OUTPUT_RAW_DATA::ID => {
33463                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::default()))
33464            }
33465            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::default())),
33466            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
33467                SET_ACTUATOR_CONTROL_TARGET_DATA::default(),
33468            )),
33469            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
33470                SET_ATTITUDE_TARGET_DATA::default(),
33471            )),
33472            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
33473                SET_GPS_GLOBAL_ORIGIN_DATA::default(),
33474            )),
33475            SET_HOME_POSITION_DATA::ID => {
33476                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::default()))
33477            }
33478            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::default())),
33479            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
33480                SET_POSITION_TARGET_GLOBAL_INT_DATA::default(),
33481            )),
33482            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
33483                SET_POSITION_TARGET_LOCAL_NED_DATA::default(),
33484            )),
33485            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::default())),
33486            SMART_BATTERY_INFO_DATA::ID => {
33487                Some(Self::SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA::default()))
33488            }
33489            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::default())),
33490            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
33491                STORAGE_INFORMATION_DATA::default(),
33492            )),
33493            SUPPORTED_TUNES_DATA::ID => {
33494                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::default()))
33495            }
33496            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::default())),
33497            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::default())),
33498            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::default())),
33499            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::default())),
33500            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::default())),
33501            TERRAIN_REQUEST_DATA::ID => {
33502                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::default()))
33503            }
33504            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::default())),
33505            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
33506                TIME_ESTIMATE_TO_TARGET_DATA::default(),
33507            )),
33508            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
33509                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
33510                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::default(),
33511                ))
33512            }
33513            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
33514                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
33515                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::default(),
33516                ))
33517            }
33518            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::default())),
33519            UALBERTA_SYS_STATUS_DATA::ID => Some(Self::UALBERTA_SYS_STATUS(
33520                UALBERTA_SYS_STATUS_DATA::default(),
33521            )),
33522            UAVCAN_NODE_INFO_DATA::ID => {
33523                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::default()))
33524            }
33525            UAVCAN_NODE_STATUS_DATA::ID => {
33526                Some(Self::UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA::default()))
33527            }
33528            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
33529                UTM_GLOBAL_POSITION_DATA::default(),
33530            )),
33531            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::default())),
33532            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::default())),
33533            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::default())),
33534            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
33535                VICON_POSITION_ESTIMATE_DATA::default(),
33536            )),
33537            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
33538                VIDEO_STREAM_INFORMATION_DATA::default(),
33539            )),
33540            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
33541                VIDEO_STREAM_STATUS_DATA::default(),
33542            )),
33543            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
33544                VISION_POSITION_ESTIMATE_DATA::default(),
33545            )),
33546            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
33547                VISION_SPEED_ESTIMATE_DATA::default(),
33548            )),
33549            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::default())),
33550            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::default())),
33551            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::default())),
33552            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::default())),
33553            _ => None,
33554        }
33555    }
33556    #[cfg(feature = "arbitrary")]
33557    fn random_message_from_id<R: rand::RngCore>(id: u32, rng: &mut R) -> Option<Self> {
33558        match id {
33559            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
33560                ACTUATOR_CONTROL_TARGET_DATA::random(rng),
33561            )),
33562            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
33563                ACTUATOR_OUTPUT_STATUS_DATA::random(rng),
33564            )),
33565            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::random(rng))),
33566            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::random(rng))),
33567            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::random(rng))),
33568            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::random(rng))),
33569            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
33570                ATTITUDE_QUATERNION_DATA::random(rng),
33571            )),
33572            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
33573                ATTITUDE_QUATERNION_COV_DATA::random(rng),
33574            )),
33575            ATTITUDE_TARGET_DATA::ID => {
33576                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::random(rng)))
33577            }
33578            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::random(rng))),
33579            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::random(rng))),
33580            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
33581                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
33582                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::random(rng),
33583                ))
33584            }
33585            AUTOPILOT_VERSION_DATA::ID => {
33586                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::random(rng)))
33587            }
33588            AVAILABLE_MODES_DATA::ID => {
33589                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::random(rng)))
33590            }
33591            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
33592                AVAILABLE_MODES_MONITOR_DATA::random(rng),
33593            )),
33594            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::random(rng))),
33595            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::random(rng))),
33596            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::random(rng))),
33597            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
33598                CAMERA_CAPTURE_STATUS_DATA::random(rng),
33599            )),
33600            CAMERA_FOV_STATUS_DATA::ID => {
33601                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::random(rng)))
33602            }
33603            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
33604                CAMERA_IMAGE_CAPTURED_DATA::random(rng),
33605            )),
33606            CAMERA_INFORMATION_DATA::ID => Some(Self::CAMERA_INFORMATION(
33607                CAMERA_INFORMATION_DATA::random(rng),
33608            )),
33609            CAMERA_SETTINGS_DATA::ID => {
33610                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::random(rng)))
33611            }
33612            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
33613                CAMERA_THERMAL_RANGE_DATA::random(rng),
33614            )),
33615            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
33616                CAMERA_TRACKING_GEO_STATUS_DATA::random(rng),
33617            )),
33618            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
33619                CAMERA_TRACKING_IMAGE_STATUS_DATA::random(rng),
33620            )),
33621            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::random(rng))),
33622            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::random(rng))),
33623            CAN_FILTER_MODIFY_DATA::ID => {
33624                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::random(rng)))
33625            }
33626            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::random(rng))),
33627            CELLULAR_CONFIG_DATA::ID => {
33628                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::random(rng)))
33629            }
33630            CELLULAR_STATUS_DATA::ID => {
33631                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::random(rng)))
33632            }
33633            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
33634                CHANGE_OPERATOR_CONTROL_DATA::random(rng),
33635            )),
33636            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
33637                CHANGE_OPERATOR_CONTROL_ACK_DATA::random(rng),
33638            )),
33639            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::random(rng))),
33640            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::random(rng))),
33641            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::random(rng))),
33642            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::random(rng))),
33643            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::random(rng))),
33644            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
33645                COMPONENT_INFORMATION_DATA::random(rng),
33646            )),
33647            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
33648                COMPONENT_INFORMATION_BASIC_DATA::random(rng),
33649            )),
33650            COMPONENT_METADATA_DATA::ID => Some(Self::COMPONENT_METADATA(
33651                COMPONENT_METADATA_DATA::random(rng),
33652            )),
33653            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
33654                CONTROL_SYSTEM_STATE_DATA::random(rng),
33655            )),
33656            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
33657                CURRENT_EVENT_SEQUENCE_DATA::random(rng),
33658            )),
33659            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::random(rng))),
33660            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::random(rng))),
33661            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
33662                DATA_TRANSMISSION_HANDSHAKE_DATA::random(rng),
33663            )),
33664            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::random(rng))),
33665            DEBUG_FLOAT_ARRAY_DATA::ID => {
33666                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::random(rng)))
33667            }
33668            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::random(rng))),
33669            DISTANCE_SENSOR_DATA::ID => {
33670                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::random(rng)))
33671            }
33672            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::random(rng))),
33673            ENCAPSULATED_DATA_DATA::ID => {
33674                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::random(rng)))
33675            }
33676            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::random(rng))),
33677            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::random(rng))),
33678            ESTIMATOR_STATUS_DATA::ID => {
33679                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::random(rng)))
33680            }
33681            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::random(rng))),
33682            EXTENDED_SYS_STATE_DATA::ID => Some(Self::EXTENDED_SYS_STATE(
33683                EXTENDED_SYS_STATE_DATA::random(rng),
33684            )),
33685            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::random(rng))),
33686            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
33687                FILE_TRANSFER_PROTOCOL_DATA::random(rng),
33688            )),
33689            FLIGHT_INFORMATION_DATA::ID => Some(Self::FLIGHT_INFORMATION(
33690                FLIGHT_INFORMATION_DATA::random(rng),
33691            )),
33692            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::random(rng))),
33693            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::random(rng))),
33694            GENERATOR_STATUS_DATA::ID => {
33695                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::random(rng)))
33696            }
33697            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
33698                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::random(rng),
33699            )),
33700            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
33701                GIMBAL_DEVICE_INFORMATION_DATA::random(rng),
33702            )),
33703            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
33704                GIMBAL_DEVICE_SET_ATTITUDE_DATA::random(rng),
33705            )),
33706            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
33707                GIMBAL_MANAGER_INFORMATION_DATA::random(rng),
33708            )),
33709            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
33710                GIMBAL_MANAGER_SET_ATTITUDE_DATA::random(rng),
33711            )),
33712            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
33713                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
33714                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::random(rng),
33715                ))
33716            }
33717            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
33718                GIMBAL_MANAGER_SET_PITCHYAW_DATA::random(rng),
33719            )),
33720            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
33721                GIMBAL_MANAGER_STATUS_DATA::random(rng),
33722            )),
33723            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
33724                GLOBAL_POSITION_INT_DATA::random(rng),
33725            )),
33726            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
33727                GLOBAL_POSITION_INT_COV_DATA::random(rng),
33728            )),
33729            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
33730                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
33731                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::random(rng),
33732                ))
33733            }
33734            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::random(rng))),
33735            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::random(rng))),
33736            GPS_GLOBAL_ORIGIN_DATA::ID => {
33737                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::random(rng)))
33738            }
33739            GPS_INJECT_DATA_DATA::ID => {
33740                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::random(rng)))
33741            }
33742            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::random(rng))),
33743            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::random(rng))),
33744            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::random(rng))),
33745            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::random(rng))),
33746            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::random(rng))),
33747            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::random(rng))),
33748            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::random(rng))),
33749            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::random(rng))),
33750            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::random(rng))),
33751            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
33752                HIL_ACTUATOR_CONTROLS_DATA::random(rng),
33753            )),
33754            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::random(rng))),
33755            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::random(rng))),
33756            HIL_OPTICAL_FLOW_DATA::ID => {
33757                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::random(rng)))
33758            }
33759            HIL_RC_INPUTS_RAW_DATA::ID => {
33760                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::random(rng)))
33761            }
33762            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::random(rng))),
33763            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::random(rng))),
33764            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
33765                HIL_STATE_QUATERNION_DATA::random(rng),
33766            )),
33767            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::random(rng))),
33768            HYGROMETER_SENSOR_DATA::ID => {
33769                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::random(rng)))
33770            }
33771            ILLUMINATOR_STATUS_DATA::ID => Some(Self::ILLUMINATOR_STATUS(
33772                ILLUMINATOR_STATUS_DATA::random(rng),
33773            )),
33774            ISBD_LINK_STATUS_DATA::ID => {
33775                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::random(rng)))
33776            }
33777            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::random(rng))),
33778            LINK_NODE_STATUS_DATA::ID => {
33779                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::random(rng)))
33780            }
33781            LOCAL_POSITION_NED_DATA::ID => Some(Self::LOCAL_POSITION_NED(
33782                LOCAL_POSITION_NED_DATA::random(rng),
33783            )),
33784            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
33785                LOCAL_POSITION_NED_COV_DATA::random(rng),
33786            )),
33787            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
33788                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
33789                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::random(rng),
33790                ))
33791            }
33792            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::random(rng))),
33793            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::random(rng))),
33794            LOGGING_DATA_ACKED_DATA::ID => Some(Self::LOGGING_DATA_ACKED(
33795                LOGGING_DATA_ACKED_DATA::random(rng),
33796            )),
33797            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::random(rng))),
33798            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::random(rng))),
33799            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::random(rng))),
33800            LOG_REQUEST_DATA_DATA::ID => {
33801                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::random(rng)))
33802            }
33803            LOG_REQUEST_END_DATA::ID => {
33804                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::random(rng)))
33805            }
33806            LOG_REQUEST_LIST_DATA::ID => {
33807                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::random(rng)))
33808            }
33809            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::random(rng))),
33810            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::random(rng))),
33811            MANUAL_SETPOINT_DATA::ID => {
33812                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::random(rng)))
33813            }
33814            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::random(rng))),
33815            MESSAGE_INTERVAL_DATA::ID => {
33816                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::random(rng)))
33817            }
33818            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::random(rng))),
33819            MISSION_CLEAR_ALL_DATA::ID => {
33820                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::random(rng)))
33821            }
33822            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::random(rng))),
33823            MISSION_CURRENT_DATA::ID => {
33824                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::random(rng)))
33825            }
33826            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::random(rng))),
33827            MISSION_ITEM_INT_DATA::ID => {
33828                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::random(rng)))
33829            }
33830            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
33831                MISSION_ITEM_REACHED_DATA::random(rng),
33832            )),
33833            MISSION_REQUEST_DATA::ID => {
33834                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::random(rng)))
33835            }
33836            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
33837                MISSION_REQUEST_INT_DATA::random(rng),
33838            )),
33839            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
33840                MISSION_REQUEST_LIST_DATA::random(rng),
33841            )),
33842            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
33843                MISSION_REQUEST_PARTIAL_LIST_DATA::random(rng),
33844            )),
33845            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
33846                MISSION_SET_CURRENT_DATA::random(rng),
33847            )),
33848            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
33849                MISSION_WRITE_PARTIAL_LIST_DATA::random(rng),
33850            )),
33851            MOUNT_ORIENTATION_DATA::ID => {
33852                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::random(rng)))
33853            }
33854            NAMED_VALUE_FLOAT_DATA::ID => {
33855                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::random(rng)))
33856            }
33857            NAMED_VALUE_INT_DATA::ID => {
33858                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::random(rng)))
33859            }
33860            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
33861                NAV_CONTROLLER_OUTPUT_DATA::random(rng),
33862            )),
33863            NAV_FILTER_BIAS_DATA::ID => {
33864                Some(Self::NAV_FILTER_BIAS(NAV_FILTER_BIAS_DATA::random(rng)))
33865            }
33866            OBSTACLE_DISTANCE_DATA::ID => {
33867                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::random(rng)))
33868            }
33869            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::random(rng))),
33870            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
33871                ONBOARD_COMPUTER_STATUS_DATA::random(rng),
33872            )),
33873            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
33874                OPEN_DRONE_ID_ARM_STATUS_DATA::random(rng),
33875            )),
33876            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
33877                OPEN_DRONE_ID_AUTHENTICATION_DATA::random(rng),
33878            )),
33879            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
33880                OPEN_DRONE_ID_BASIC_ID_DATA::random(rng),
33881            )),
33882            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
33883                OPEN_DRONE_ID_LOCATION_DATA::random(rng),
33884            )),
33885            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
33886                OPEN_DRONE_ID_MESSAGE_PACK_DATA::random(rng),
33887            )),
33888            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
33889                OPEN_DRONE_ID_OPERATOR_ID_DATA::random(rng),
33890            )),
33891            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
33892                OPEN_DRONE_ID_SELF_ID_DATA::random(rng),
33893            )),
33894            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
33895                OPEN_DRONE_ID_SYSTEM_DATA::random(rng),
33896            )),
33897            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
33898                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::random(rng),
33899            )),
33900            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::random(rng))),
33901            OPTICAL_FLOW_RAD_DATA::ID => {
33902                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::random(rng)))
33903            }
33904            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
33905                ORBIT_EXECUTION_STATUS_DATA::random(rng),
33906            )),
33907            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::random(rng))),
33908            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
33909                PARAM_EXT_REQUEST_LIST_DATA::random(rng),
33910            )),
33911            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
33912                PARAM_EXT_REQUEST_READ_DATA::random(rng),
33913            )),
33914            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::random(rng))),
33915            PARAM_EXT_VALUE_DATA::ID => {
33916                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::random(rng)))
33917            }
33918            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::random(rng))),
33919            PARAM_REQUEST_LIST_DATA::ID => Some(Self::PARAM_REQUEST_LIST(
33920                PARAM_REQUEST_LIST_DATA::random(rng),
33921            )),
33922            PARAM_REQUEST_READ_DATA::ID => Some(Self::PARAM_REQUEST_READ(
33923                PARAM_REQUEST_READ_DATA::random(rng),
33924            )),
33925            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::random(rng))),
33926            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::random(rng))),
33927            PING_DATA::ID => Some(Self::PING(PING_DATA::random(rng))),
33928            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::random(rng))),
33929            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::random(rng))),
33930            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
33931                POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
33932            )),
33933            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
33934                POSITION_TARGET_LOCAL_NED_DATA::random(rng),
33935            )),
33936            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::random(rng))),
33937            PROTOCOL_VERSION_DATA::ID => {
33938                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::random(rng)))
33939            }
33940            RADIO_CALIBRATION_DATA::ID => {
33941                Some(Self::RADIO_CALIBRATION(RADIO_CALIBRATION_DATA::random(rng)))
33942            }
33943            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::random(rng))),
33944            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::random(rng))),
33945            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::random(rng))),
33946            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::random(rng))),
33947            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::random(rng))),
33948            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
33949                RC_CHANNELS_OVERRIDE_DATA::random(rng),
33950            )),
33951            RC_CHANNELS_RAW_DATA::ID => {
33952                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::random(rng)))
33953            }
33954            RC_CHANNELS_SCALED_DATA::ID => Some(Self::RC_CHANNELS_SCALED(
33955                RC_CHANNELS_SCALED_DATA::random(rng),
33956            )),
33957            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
33958                REQUEST_DATA_STREAM_DATA::random(rng),
33959            )),
33960            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::random(rng))),
33961            RESOURCE_REQUEST_DATA::ID => {
33962                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::random(rng)))
33963            }
33964            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
33965                RESPONSE_EVENT_ERROR_DATA::random(rng),
33966            )),
33967            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
33968                SAFETY_ALLOWED_AREA_DATA::random(rng),
33969            )),
33970            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
33971                SAFETY_SET_ALLOWED_AREA_DATA::random(rng),
33972            )),
33973            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::random(rng))),
33974            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::random(rng))),
33975            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::random(rng))),
33976            SCALED_PRESSURE_DATA::ID => {
33977                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::random(rng)))
33978            }
33979            SCALED_PRESSURE2_DATA::ID => {
33980                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::random(rng)))
33981            }
33982            SCALED_PRESSURE3_DATA::ID => {
33983                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::random(rng)))
33984            }
33985            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::random(rng))),
33986            SERVO_OUTPUT_RAW_DATA::ID => {
33987                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::random(rng)))
33988            }
33989            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::random(rng))),
33990            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
33991                SET_ACTUATOR_CONTROL_TARGET_DATA::random(rng),
33992            )),
33993            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
33994                SET_ATTITUDE_TARGET_DATA::random(rng),
33995            )),
33996            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
33997                SET_GPS_GLOBAL_ORIGIN_DATA::random(rng),
33998            )),
33999            SET_HOME_POSITION_DATA::ID => {
34000                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::random(rng)))
34001            }
34002            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::random(rng))),
34003            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
34004                SET_POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
34005            )),
34006            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
34007                SET_POSITION_TARGET_LOCAL_NED_DATA::random(rng),
34008            )),
34009            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::random(rng))),
34010            SMART_BATTERY_INFO_DATA::ID => Some(Self::SMART_BATTERY_INFO(
34011                SMART_BATTERY_INFO_DATA::random(rng),
34012            )),
34013            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::random(rng))),
34014            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
34015                STORAGE_INFORMATION_DATA::random(rng),
34016            )),
34017            SUPPORTED_TUNES_DATA::ID => {
34018                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::random(rng)))
34019            }
34020            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::random(rng))),
34021            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::random(rng))),
34022            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::random(rng))),
34023            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::random(rng))),
34024            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::random(rng))),
34025            TERRAIN_REQUEST_DATA::ID => {
34026                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::random(rng)))
34027            }
34028            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::random(rng))),
34029            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
34030                TIME_ESTIMATE_TO_TARGET_DATA::random(rng),
34031            )),
34032            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
34033                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
34034                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::random(rng),
34035                ))
34036            }
34037            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
34038                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
34039                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::random(rng),
34040                ))
34041            }
34042            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::random(rng))),
34043            UALBERTA_SYS_STATUS_DATA::ID => Some(Self::UALBERTA_SYS_STATUS(
34044                UALBERTA_SYS_STATUS_DATA::random(rng),
34045            )),
34046            UAVCAN_NODE_INFO_DATA::ID => {
34047                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::random(rng)))
34048            }
34049            UAVCAN_NODE_STATUS_DATA::ID => Some(Self::UAVCAN_NODE_STATUS(
34050                UAVCAN_NODE_STATUS_DATA::random(rng),
34051            )),
34052            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
34053                UTM_GLOBAL_POSITION_DATA::random(rng),
34054            )),
34055            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::random(rng))),
34056            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::random(rng))),
34057            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::random(rng))),
34058            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
34059                VICON_POSITION_ESTIMATE_DATA::random(rng),
34060            )),
34061            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
34062                VIDEO_STREAM_INFORMATION_DATA::random(rng),
34063            )),
34064            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
34065                VIDEO_STREAM_STATUS_DATA::random(rng),
34066            )),
34067            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
34068                VISION_POSITION_ESTIMATE_DATA::random(rng),
34069            )),
34070            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
34071                VISION_SPEED_ESTIMATE_DATA::random(rng),
34072            )),
34073            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::random(rng))),
34074            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::random(rng))),
34075            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::random(rng))),
34076            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::random(rng))),
34077            _ => None,
34078        }
34079    }
34080    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34081        match self {
34082            Self::ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
34083            Self::ACTUATOR_OUTPUT_STATUS(body) => body.ser(version, bytes),
34084            Self::ADSB_VEHICLE(body) => body.ser(version, bytes),
34085            Self::AIS_VESSEL(body) => body.ser(version, bytes),
34086            Self::ALTITUDE(body) => body.ser(version, bytes),
34087            Self::ATTITUDE(body) => body.ser(version, bytes),
34088            Self::ATTITUDE_QUATERNION(body) => body.ser(version, bytes),
34089            Self::ATTITUDE_QUATERNION_COV(body) => body.ser(version, bytes),
34090            Self::ATTITUDE_TARGET(body) => body.ser(version, bytes),
34091            Self::ATT_POS_MOCAP(body) => body.ser(version, bytes),
34092            Self::AUTH_KEY(body) => body.ser(version, bytes),
34093            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(body) => body.ser(version, bytes),
34094            Self::AUTOPILOT_VERSION(body) => body.ser(version, bytes),
34095            Self::AVAILABLE_MODES(body) => body.ser(version, bytes),
34096            Self::AVAILABLE_MODES_MONITOR(body) => body.ser(version, bytes),
34097            Self::BATTERY_INFO(body) => body.ser(version, bytes),
34098            Self::BATTERY_STATUS(body) => body.ser(version, bytes),
34099            Self::BUTTON_CHANGE(body) => body.ser(version, bytes),
34100            Self::CAMERA_CAPTURE_STATUS(body) => body.ser(version, bytes),
34101            Self::CAMERA_FOV_STATUS(body) => body.ser(version, bytes),
34102            Self::CAMERA_IMAGE_CAPTURED(body) => body.ser(version, bytes),
34103            Self::CAMERA_INFORMATION(body) => body.ser(version, bytes),
34104            Self::CAMERA_SETTINGS(body) => body.ser(version, bytes),
34105            Self::CAMERA_THERMAL_RANGE(body) => body.ser(version, bytes),
34106            Self::CAMERA_TRACKING_GEO_STATUS(body) => body.ser(version, bytes),
34107            Self::CAMERA_TRACKING_IMAGE_STATUS(body) => body.ser(version, bytes),
34108            Self::CAMERA_TRIGGER(body) => body.ser(version, bytes),
34109            Self::CANFD_FRAME(body) => body.ser(version, bytes),
34110            Self::CAN_FILTER_MODIFY(body) => body.ser(version, bytes),
34111            Self::CAN_FRAME(body) => body.ser(version, bytes),
34112            Self::CELLULAR_CONFIG(body) => body.ser(version, bytes),
34113            Self::CELLULAR_STATUS(body) => body.ser(version, bytes),
34114            Self::CHANGE_OPERATOR_CONTROL(body) => body.ser(version, bytes),
34115            Self::CHANGE_OPERATOR_CONTROL_ACK(body) => body.ser(version, bytes),
34116            Self::COLLISION(body) => body.ser(version, bytes),
34117            Self::COMMAND_ACK(body) => body.ser(version, bytes),
34118            Self::COMMAND_CANCEL(body) => body.ser(version, bytes),
34119            Self::COMMAND_INT(body) => body.ser(version, bytes),
34120            Self::COMMAND_LONG(body) => body.ser(version, bytes),
34121            Self::COMPONENT_INFORMATION(body) => body.ser(version, bytes),
34122            Self::COMPONENT_INFORMATION_BASIC(body) => body.ser(version, bytes),
34123            Self::COMPONENT_METADATA(body) => body.ser(version, bytes),
34124            Self::CONTROL_SYSTEM_STATE(body) => body.ser(version, bytes),
34125            Self::CURRENT_EVENT_SEQUENCE(body) => body.ser(version, bytes),
34126            Self::CURRENT_MODE(body) => body.ser(version, bytes),
34127            Self::DATA_STREAM(body) => body.ser(version, bytes),
34128            Self::DATA_TRANSMISSION_HANDSHAKE(body) => body.ser(version, bytes),
34129            Self::DEBUG(body) => body.ser(version, bytes),
34130            Self::DEBUG_FLOAT_ARRAY(body) => body.ser(version, bytes),
34131            Self::DEBUG_VECT(body) => body.ser(version, bytes),
34132            Self::DISTANCE_SENSOR(body) => body.ser(version, bytes),
34133            Self::EFI_STATUS(body) => body.ser(version, bytes),
34134            Self::ENCAPSULATED_DATA(body) => body.ser(version, bytes),
34135            Self::ESC_INFO(body) => body.ser(version, bytes),
34136            Self::ESC_STATUS(body) => body.ser(version, bytes),
34137            Self::ESTIMATOR_STATUS(body) => body.ser(version, bytes),
34138            Self::EVENT(body) => body.ser(version, bytes),
34139            Self::EXTENDED_SYS_STATE(body) => body.ser(version, bytes),
34140            Self::FENCE_STATUS(body) => body.ser(version, bytes),
34141            Self::FILE_TRANSFER_PROTOCOL(body) => body.ser(version, bytes),
34142            Self::FLIGHT_INFORMATION(body) => body.ser(version, bytes),
34143            Self::FOLLOW_TARGET(body) => body.ser(version, bytes),
34144            Self::FUEL_STATUS(body) => body.ser(version, bytes),
34145            Self::GENERATOR_STATUS(body) => body.ser(version, bytes),
34146            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(body) => body.ser(version, bytes),
34147            Self::GIMBAL_DEVICE_INFORMATION(body) => body.ser(version, bytes),
34148            Self::GIMBAL_DEVICE_SET_ATTITUDE(body) => body.ser(version, bytes),
34149            Self::GIMBAL_MANAGER_INFORMATION(body) => body.ser(version, bytes),
34150            Self::GIMBAL_MANAGER_SET_ATTITUDE(body) => body.ser(version, bytes),
34151            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(body) => body.ser(version, bytes),
34152            Self::GIMBAL_MANAGER_SET_PITCHYAW(body) => body.ser(version, bytes),
34153            Self::GIMBAL_MANAGER_STATUS(body) => body.ser(version, bytes),
34154            Self::GLOBAL_POSITION_INT(body) => body.ser(version, bytes),
34155            Self::GLOBAL_POSITION_INT_COV(body) => body.ser(version, bytes),
34156            Self::GLOBAL_VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
34157            Self::GPS2_RAW(body) => body.ser(version, bytes),
34158            Self::GPS2_RTK(body) => body.ser(version, bytes),
34159            Self::GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
34160            Self::GPS_INJECT_DATA(body) => body.ser(version, bytes),
34161            Self::GPS_INPUT(body) => body.ser(version, bytes),
34162            Self::GPS_RAW_INT(body) => body.ser(version, bytes),
34163            Self::GPS_RTCM_DATA(body) => body.ser(version, bytes),
34164            Self::GPS_RTK(body) => body.ser(version, bytes),
34165            Self::GPS_STATUS(body) => body.ser(version, bytes),
34166            Self::HEARTBEAT(body) => body.ser(version, bytes),
34167            Self::HIGHRES_IMU(body) => body.ser(version, bytes),
34168            Self::HIGH_LATENCY(body) => body.ser(version, bytes),
34169            Self::HIGH_LATENCY2(body) => body.ser(version, bytes),
34170            Self::HIL_ACTUATOR_CONTROLS(body) => body.ser(version, bytes),
34171            Self::HIL_CONTROLS(body) => body.ser(version, bytes),
34172            Self::HIL_GPS(body) => body.ser(version, bytes),
34173            Self::HIL_OPTICAL_FLOW(body) => body.ser(version, bytes),
34174            Self::HIL_RC_INPUTS_RAW(body) => body.ser(version, bytes),
34175            Self::HIL_SENSOR(body) => body.ser(version, bytes),
34176            Self::HIL_STATE(body) => body.ser(version, bytes),
34177            Self::HIL_STATE_QUATERNION(body) => body.ser(version, bytes),
34178            Self::HOME_POSITION(body) => body.ser(version, bytes),
34179            Self::HYGROMETER_SENSOR(body) => body.ser(version, bytes),
34180            Self::ILLUMINATOR_STATUS(body) => body.ser(version, bytes),
34181            Self::ISBD_LINK_STATUS(body) => body.ser(version, bytes),
34182            Self::LANDING_TARGET(body) => body.ser(version, bytes),
34183            Self::LINK_NODE_STATUS(body) => body.ser(version, bytes),
34184            Self::LOCAL_POSITION_NED(body) => body.ser(version, bytes),
34185            Self::LOCAL_POSITION_NED_COV(body) => body.ser(version, bytes),
34186            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(body) => body.ser(version, bytes),
34187            Self::LOGGING_ACK(body) => body.ser(version, bytes),
34188            Self::LOGGING_DATA(body) => body.ser(version, bytes),
34189            Self::LOGGING_DATA_ACKED(body) => body.ser(version, bytes),
34190            Self::LOG_DATA(body) => body.ser(version, bytes),
34191            Self::LOG_ENTRY(body) => body.ser(version, bytes),
34192            Self::LOG_ERASE(body) => body.ser(version, bytes),
34193            Self::LOG_REQUEST_DATA(body) => body.ser(version, bytes),
34194            Self::LOG_REQUEST_END(body) => body.ser(version, bytes),
34195            Self::LOG_REQUEST_LIST(body) => body.ser(version, bytes),
34196            Self::MAG_CAL_REPORT(body) => body.ser(version, bytes),
34197            Self::MANUAL_CONTROL(body) => body.ser(version, bytes),
34198            Self::MANUAL_SETPOINT(body) => body.ser(version, bytes),
34199            Self::MEMORY_VECT(body) => body.ser(version, bytes),
34200            Self::MESSAGE_INTERVAL(body) => body.ser(version, bytes),
34201            Self::MISSION_ACK(body) => body.ser(version, bytes),
34202            Self::MISSION_CLEAR_ALL(body) => body.ser(version, bytes),
34203            Self::MISSION_COUNT(body) => body.ser(version, bytes),
34204            Self::MISSION_CURRENT(body) => body.ser(version, bytes),
34205            Self::MISSION_ITEM(body) => body.ser(version, bytes),
34206            Self::MISSION_ITEM_INT(body) => body.ser(version, bytes),
34207            Self::MISSION_ITEM_REACHED(body) => body.ser(version, bytes),
34208            Self::MISSION_REQUEST(body) => body.ser(version, bytes),
34209            Self::MISSION_REQUEST_INT(body) => body.ser(version, bytes),
34210            Self::MISSION_REQUEST_LIST(body) => body.ser(version, bytes),
34211            Self::MISSION_REQUEST_PARTIAL_LIST(body) => body.ser(version, bytes),
34212            Self::MISSION_SET_CURRENT(body) => body.ser(version, bytes),
34213            Self::MISSION_WRITE_PARTIAL_LIST(body) => body.ser(version, bytes),
34214            Self::MOUNT_ORIENTATION(body) => body.ser(version, bytes),
34215            Self::NAMED_VALUE_FLOAT(body) => body.ser(version, bytes),
34216            Self::NAMED_VALUE_INT(body) => body.ser(version, bytes),
34217            Self::NAV_CONTROLLER_OUTPUT(body) => body.ser(version, bytes),
34218            Self::NAV_FILTER_BIAS(body) => body.ser(version, bytes),
34219            Self::OBSTACLE_DISTANCE(body) => body.ser(version, bytes),
34220            Self::ODOMETRY(body) => body.ser(version, bytes),
34221            Self::ONBOARD_COMPUTER_STATUS(body) => body.ser(version, bytes),
34222            Self::OPEN_DRONE_ID_ARM_STATUS(body) => body.ser(version, bytes),
34223            Self::OPEN_DRONE_ID_AUTHENTICATION(body) => body.ser(version, bytes),
34224            Self::OPEN_DRONE_ID_BASIC_ID(body) => body.ser(version, bytes),
34225            Self::OPEN_DRONE_ID_LOCATION(body) => body.ser(version, bytes),
34226            Self::OPEN_DRONE_ID_MESSAGE_PACK(body) => body.ser(version, bytes),
34227            Self::OPEN_DRONE_ID_OPERATOR_ID(body) => body.ser(version, bytes),
34228            Self::OPEN_DRONE_ID_SELF_ID(body) => body.ser(version, bytes),
34229            Self::OPEN_DRONE_ID_SYSTEM(body) => body.ser(version, bytes),
34230            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(body) => body.ser(version, bytes),
34231            Self::OPTICAL_FLOW(body) => body.ser(version, bytes),
34232            Self::OPTICAL_FLOW_RAD(body) => body.ser(version, bytes),
34233            Self::ORBIT_EXECUTION_STATUS(body) => body.ser(version, bytes),
34234            Self::PARAM_EXT_ACK(body) => body.ser(version, bytes),
34235            Self::PARAM_EXT_REQUEST_LIST(body) => body.ser(version, bytes),
34236            Self::PARAM_EXT_REQUEST_READ(body) => body.ser(version, bytes),
34237            Self::PARAM_EXT_SET(body) => body.ser(version, bytes),
34238            Self::PARAM_EXT_VALUE(body) => body.ser(version, bytes),
34239            Self::PARAM_MAP_RC(body) => body.ser(version, bytes),
34240            Self::PARAM_REQUEST_LIST(body) => body.ser(version, bytes),
34241            Self::PARAM_REQUEST_READ(body) => body.ser(version, bytes),
34242            Self::PARAM_SET(body) => body.ser(version, bytes),
34243            Self::PARAM_VALUE(body) => body.ser(version, bytes),
34244            Self::PING(body) => body.ser(version, bytes),
34245            Self::PLAY_TUNE(body) => body.ser(version, bytes),
34246            Self::PLAY_TUNE_V2(body) => body.ser(version, bytes),
34247            Self::POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
34248            Self::POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
34249            Self::POWER_STATUS(body) => body.ser(version, bytes),
34250            Self::PROTOCOL_VERSION(body) => body.ser(version, bytes),
34251            Self::RADIO_CALIBRATION(body) => body.ser(version, bytes),
34252            Self::RADIO_STATUS(body) => body.ser(version, bytes),
34253            Self::RAW_IMU(body) => body.ser(version, bytes),
34254            Self::RAW_PRESSURE(body) => body.ser(version, bytes),
34255            Self::RAW_RPM(body) => body.ser(version, bytes),
34256            Self::RC_CHANNELS(body) => body.ser(version, bytes),
34257            Self::RC_CHANNELS_OVERRIDE(body) => body.ser(version, bytes),
34258            Self::RC_CHANNELS_RAW(body) => body.ser(version, bytes),
34259            Self::RC_CHANNELS_SCALED(body) => body.ser(version, bytes),
34260            Self::REQUEST_DATA_STREAM(body) => body.ser(version, bytes),
34261            Self::REQUEST_EVENT(body) => body.ser(version, bytes),
34262            Self::RESOURCE_REQUEST(body) => body.ser(version, bytes),
34263            Self::RESPONSE_EVENT_ERROR(body) => body.ser(version, bytes),
34264            Self::SAFETY_ALLOWED_AREA(body) => body.ser(version, bytes),
34265            Self::SAFETY_SET_ALLOWED_AREA(body) => body.ser(version, bytes),
34266            Self::SCALED_IMU(body) => body.ser(version, bytes),
34267            Self::SCALED_IMU2(body) => body.ser(version, bytes),
34268            Self::SCALED_IMU3(body) => body.ser(version, bytes),
34269            Self::SCALED_PRESSURE(body) => body.ser(version, bytes),
34270            Self::SCALED_PRESSURE2(body) => body.ser(version, bytes),
34271            Self::SCALED_PRESSURE3(body) => body.ser(version, bytes),
34272            Self::SERIAL_CONTROL(body) => body.ser(version, bytes),
34273            Self::SERVO_OUTPUT_RAW(body) => body.ser(version, bytes),
34274            Self::SETUP_SIGNING(body) => body.ser(version, bytes),
34275            Self::SET_ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
34276            Self::SET_ATTITUDE_TARGET(body) => body.ser(version, bytes),
34277            Self::SET_GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
34278            Self::SET_HOME_POSITION(body) => body.ser(version, bytes),
34279            Self::SET_MODE(body) => body.ser(version, bytes),
34280            Self::SET_POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
34281            Self::SET_POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
34282            Self::SIM_STATE(body) => body.ser(version, bytes),
34283            Self::SMART_BATTERY_INFO(body) => body.ser(version, bytes),
34284            Self::STATUSTEXT(body) => body.ser(version, bytes),
34285            Self::STORAGE_INFORMATION(body) => body.ser(version, bytes),
34286            Self::SUPPORTED_TUNES(body) => body.ser(version, bytes),
34287            Self::SYSTEM_TIME(body) => body.ser(version, bytes),
34288            Self::SYS_STATUS(body) => body.ser(version, bytes),
34289            Self::TERRAIN_CHECK(body) => body.ser(version, bytes),
34290            Self::TERRAIN_DATA(body) => body.ser(version, bytes),
34291            Self::TERRAIN_REPORT(body) => body.ser(version, bytes),
34292            Self::TERRAIN_REQUEST(body) => body.ser(version, bytes),
34293            Self::TIMESYNC(body) => body.ser(version, bytes),
34294            Self::TIME_ESTIMATE_TO_TARGET(body) => body.ser(version, bytes),
34295            Self::TRAJECTORY_REPRESENTATION_BEZIER(body) => body.ser(version, bytes),
34296            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(body) => body.ser(version, bytes),
34297            Self::TUNNEL(body) => body.ser(version, bytes),
34298            Self::UALBERTA_SYS_STATUS(body) => body.ser(version, bytes),
34299            Self::UAVCAN_NODE_INFO(body) => body.ser(version, bytes),
34300            Self::UAVCAN_NODE_STATUS(body) => body.ser(version, bytes),
34301            Self::UTM_GLOBAL_POSITION(body) => body.ser(version, bytes),
34302            Self::V2_EXTENSION(body) => body.ser(version, bytes),
34303            Self::VFR_HUD(body) => body.ser(version, bytes),
34304            Self::VIBRATION(body) => body.ser(version, bytes),
34305            Self::VICON_POSITION_ESTIMATE(body) => body.ser(version, bytes),
34306            Self::VIDEO_STREAM_INFORMATION(body) => body.ser(version, bytes),
34307            Self::VIDEO_STREAM_STATUS(body) => body.ser(version, bytes),
34308            Self::VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
34309            Self::VISION_SPEED_ESTIMATE(body) => body.ser(version, bytes),
34310            Self::WHEEL_DISTANCE(body) => body.ser(version, bytes),
34311            Self::WIFI_CONFIG_AP(body) => body.ser(version, bytes),
34312            Self::WINCH_STATUS(body) => body.ser(version, bytes),
34313            Self::WIND_COV(body) => body.ser(version, bytes),
34314        }
34315    }
34316    fn extra_crc(id: u32) -> u8 {
34317        match id {
34318            ACTUATOR_CONTROL_TARGET_DATA::ID => ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
34319            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::EXTRA_CRC,
34320            ADSB_VEHICLE_DATA::ID => ADSB_VEHICLE_DATA::EXTRA_CRC,
34321            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::EXTRA_CRC,
34322            ALTITUDE_DATA::ID => ALTITUDE_DATA::EXTRA_CRC,
34323            ATTITUDE_DATA::ID => ATTITUDE_DATA::EXTRA_CRC,
34324            ATTITUDE_QUATERNION_DATA::ID => ATTITUDE_QUATERNION_DATA::EXTRA_CRC,
34325            ATTITUDE_QUATERNION_COV_DATA::ID => ATTITUDE_QUATERNION_COV_DATA::EXTRA_CRC,
34326            ATTITUDE_TARGET_DATA::ID => ATTITUDE_TARGET_DATA::EXTRA_CRC,
34327            ATT_POS_MOCAP_DATA::ID => ATT_POS_MOCAP_DATA::EXTRA_CRC,
34328            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::EXTRA_CRC,
34329            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
34330                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::EXTRA_CRC
34331            }
34332            AUTOPILOT_VERSION_DATA::ID => AUTOPILOT_VERSION_DATA::EXTRA_CRC,
34333            AVAILABLE_MODES_DATA::ID => AVAILABLE_MODES_DATA::EXTRA_CRC,
34334            AVAILABLE_MODES_MONITOR_DATA::ID => AVAILABLE_MODES_MONITOR_DATA::EXTRA_CRC,
34335            BATTERY_INFO_DATA::ID => BATTERY_INFO_DATA::EXTRA_CRC,
34336            BATTERY_STATUS_DATA::ID => BATTERY_STATUS_DATA::EXTRA_CRC,
34337            BUTTON_CHANGE_DATA::ID => BUTTON_CHANGE_DATA::EXTRA_CRC,
34338            CAMERA_CAPTURE_STATUS_DATA::ID => CAMERA_CAPTURE_STATUS_DATA::EXTRA_CRC,
34339            CAMERA_FOV_STATUS_DATA::ID => CAMERA_FOV_STATUS_DATA::EXTRA_CRC,
34340            CAMERA_IMAGE_CAPTURED_DATA::ID => CAMERA_IMAGE_CAPTURED_DATA::EXTRA_CRC,
34341            CAMERA_INFORMATION_DATA::ID => CAMERA_INFORMATION_DATA::EXTRA_CRC,
34342            CAMERA_SETTINGS_DATA::ID => CAMERA_SETTINGS_DATA::EXTRA_CRC,
34343            CAMERA_THERMAL_RANGE_DATA::ID => CAMERA_THERMAL_RANGE_DATA::EXTRA_CRC,
34344            CAMERA_TRACKING_GEO_STATUS_DATA::ID => CAMERA_TRACKING_GEO_STATUS_DATA::EXTRA_CRC,
34345            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => CAMERA_TRACKING_IMAGE_STATUS_DATA::EXTRA_CRC,
34346            CAMERA_TRIGGER_DATA::ID => CAMERA_TRIGGER_DATA::EXTRA_CRC,
34347            CANFD_FRAME_DATA::ID => CANFD_FRAME_DATA::EXTRA_CRC,
34348            CAN_FILTER_MODIFY_DATA::ID => CAN_FILTER_MODIFY_DATA::EXTRA_CRC,
34349            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::EXTRA_CRC,
34350            CELLULAR_CONFIG_DATA::ID => CELLULAR_CONFIG_DATA::EXTRA_CRC,
34351            CELLULAR_STATUS_DATA::ID => CELLULAR_STATUS_DATA::EXTRA_CRC,
34352            CHANGE_OPERATOR_CONTROL_DATA::ID => CHANGE_OPERATOR_CONTROL_DATA::EXTRA_CRC,
34353            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => CHANGE_OPERATOR_CONTROL_ACK_DATA::EXTRA_CRC,
34354            COLLISION_DATA::ID => COLLISION_DATA::EXTRA_CRC,
34355            COMMAND_ACK_DATA::ID => COMMAND_ACK_DATA::EXTRA_CRC,
34356            COMMAND_CANCEL_DATA::ID => COMMAND_CANCEL_DATA::EXTRA_CRC,
34357            COMMAND_INT_DATA::ID => COMMAND_INT_DATA::EXTRA_CRC,
34358            COMMAND_LONG_DATA::ID => COMMAND_LONG_DATA::EXTRA_CRC,
34359            COMPONENT_INFORMATION_DATA::ID => COMPONENT_INFORMATION_DATA::EXTRA_CRC,
34360            COMPONENT_INFORMATION_BASIC_DATA::ID => COMPONENT_INFORMATION_BASIC_DATA::EXTRA_CRC,
34361            COMPONENT_METADATA_DATA::ID => COMPONENT_METADATA_DATA::EXTRA_CRC,
34362            CONTROL_SYSTEM_STATE_DATA::ID => CONTROL_SYSTEM_STATE_DATA::EXTRA_CRC,
34363            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::EXTRA_CRC,
34364            CURRENT_MODE_DATA::ID => CURRENT_MODE_DATA::EXTRA_CRC,
34365            DATA_STREAM_DATA::ID => DATA_STREAM_DATA::EXTRA_CRC,
34366            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => DATA_TRANSMISSION_HANDSHAKE_DATA::EXTRA_CRC,
34367            DEBUG_DATA::ID => DEBUG_DATA::EXTRA_CRC,
34368            DEBUG_FLOAT_ARRAY_DATA::ID => DEBUG_FLOAT_ARRAY_DATA::EXTRA_CRC,
34369            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::EXTRA_CRC,
34370            DISTANCE_SENSOR_DATA::ID => DISTANCE_SENSOR_DATA::EXTRA_CRC,
34371            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::EXTRA_CRC,
34372            ENCAPSULATED_DATA_DATA::ID => ENCAPSULATED_DATA_DATA::EXTRA_CRC,
34373            ESC_INFO_DATA::ID => ESC_INFO_DATA::EXTRA_CRC,
34374            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::EXTRA_CRC,
34375            ESTIMATOR_STATUS_DATA::ID => ESTIMATOR_STATUS_DATA::EXTRA_CRC,
34376            EVENT_DATA::ID => EVENT_DATA::EXTRA_CRC,
34377            EXTENDED_SYS_STATE_DATA::ID => EXTENDED_SYS_STATE_DATA::EXTRA_CRC,
34378            FENCE_STATUS_DATA::ID => FENCE_STATUS_DATA::EXTRA_CRC,
34379            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::EXTRA_CRC,
34380            FLIGHT_INFORMATION_DATA::ID => FLIGHT_INFORMATION_DATA::EXTRA_CRC,
34381            FOLLOW_TARGET_DATA::ID => FOLLOW_TARGET_DATA::EXTRA_CRC,
34382            FUEL_STATUS_DATA::ID => FUEL_STATUS_DATA::EXTRA_CRC,
34383            GENERATOR_STATUS_DATA::ID => GENERATOR_STATUS_DATA::EXTRA_CRC,
34384            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::EXTRA_CRC,
34385            GIMBAL_DEVICE_INFORMATION_DATA::ID => GIMBAL_DEVICE_INFORMATION_DATA::EXTRA_CRC,
34386            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => GIMBAL_DEVICE_SET_ATTITUDE_DATA::EXTRA_CRC,
34387            GIMBAL_MANAGER_INFORMATION_DATA::ID => GIMBAL_MANAGER_INFORMATION_DATA::EXTRA_CRC,
34388            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => GIMBAL_MANAGER_SET_ATTITUDE_DATA::EXTRA_CRC,
34389            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
34390                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::EXTRA_CRC
34391            }
34392            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => GIMBAL_MANAGER_SET_PITCHYAW_DATA::EXTRA_CRC,
34393            GIMBAL_MANAGER_STATUS_DATA::ID => GIMBAL_MANAGER_STATUS_DATA::EXTRA_CRC,
34394            GLOBAL_POSITION_INT_DATA::ID => GLOBAL_POSITION_INT_DATA::EXTRA_CRC,
34395            GLOBAL_POSITION_INT_COV_DATA::ID => GLOBAL_POSITION_INT_COV_DATA::EXTRA_CRC,
34396            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
34397                GLOBAL_VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC
34398            }
34399            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::EXTRA_CRC,
34400            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::EXTRA_CRC,
34401            GPS_GLOBAL_ORIGIN_DATA::ID => GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
34402            GPS_INJECT_DATA_DATA::ID => GPS_INJECT_DATA_DATA::EXTRA_CRC,
34403            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::EXTRA_CRC,
34404            GPS_RAW_INT_DATA::ID => GPS_RAW_INT_DATA::EXTRA_CRC,
34405            GPS_RTCM_DATA_DATA::ID => GPS_RTCM_DATA_DATA::EXTRA_CRC,
34406            GPS_RTK_DATA::ID => GPS_RTK_DATA::EXTRA_CRC,
34407            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::EXTRA_CRC,
34408            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::EXTRA_CRC,
34409            HIGHRES_IMU_DATA::ID => HIGHRES_IMU_DATA::EXTRA_CRC,
34410            HIGH_LATENCY_DATA::ID => HIGH_LATENCY_DATA::EXTRA_CRC,
34411            HIGH_LATENCY2_DATA::ID => HIGH_LATENCY2_DATA::EXTRA_CRC,
34412            HIL_ACTUATOR_CONTROLS_DATA::ID => HIL_ACTUATOR_CONTROLS_DATA::EXTRA_CRC,
34413            HIL_CONTROLS_DATA::ID => HIL_CONTROLS_DATA::EXTRA_CRC,
34414            HIL_GPS_DATA::ID => HIL_GPS_DATA::EXTRA_CRC,
34415            HIL_OPTICAL_FLOW_DATA::ID => HIL_OPTICAL_FLOW_DATA::EXTRA_CRC,
34416            HIL_RC_INPUTS_RAW_DATA::ID => HIL_RC_INPUTS_RAW_DATA::EXTRA_CRC,
34417            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::EXTRA_CRC,
34418            HIL_STATE_DATA::ID => HIL_STATE_DATA::EXTRA_CRC,
34419            HIL_STATE_QUATERNION_DATA::ID => HIL_STATE_QUATERNION_DATA::EXTRA_CRC,
34420            HOME_POSITION_DATA::ID => HOME_POSITION_DATA::EXTRA_CRC,
34421            HYGROMETER_SENSOR_DATA::ID => HYGROMETER_SENSOR_DATA::EXTRA_CRC,
34422            ILLUMINATOR_STATUS_DATA::ID => ILLUMINATOR_STATUS_DATA::EXTRA_CRC,
34423            ISBD_LINK_STATUS_DATA::ID => ISBD_LINK_STATUS_DATA::EXTRA_CRC,
34424            LANDING_TARGET_DATA::ID => LANDING_TARGET_DATA::EXTRA_CRC,
34425            LINK_NODE_STATUS_DATA::ID => LINK_NODE_STATUS_DATA::EXTRA_CRC,
34426            LOCAL_POSITION_NED_DATA::ID => LOCAL_POSITION_NED_DATA::EXTRA_CRC,
34427            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::EXTRA_CRC,
34428            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
34429                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::EXTRA_CRC
34430            }
34431            LOGGING_ACK_DATA::ID => LOGGING_ACK_DATA::EXTRA_CRC,
34432            LOGGING_DATA_DATA::ID => LOGGING_DATA_DATA::EXTRA_CRC,
34433            LOGGING_DATA_ACKED_DATA::ID => LOGGING_DATA_ACKED_DATA::EXTRA_CRC,
34434            LOG_DATA_DATA::ID => LOG_DATA_DATA::EXTRA_CRC,
34435            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::EXTRA_CRC,
34436            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::EXTRA_CRC,
34437            LOG_REQUEST_DATA_DATA::ID => LOG_REQUEST_DATA_DATA::EXTRA_CRC,
34438            LOG_REQUEST_END_DATA::ID => LOG_REQUEST_END_DATA::EXTRA_CRC,
34439            LOG_REQUEST_LIST_DATA::ID => LOG_REQUEST_LIST_DATA::EXTRA_CRC,
34440            MAG_CAL_REPORT_DATA::ID => MAG_CAL_REPORT_DATA::EXTRA_CRC,
34441            MANUAL_CONTROL_DATA::ID => MANUAL_CONTROL_DATA::EXTRA_CRC,
34442            MANUAL_SETPOINT_DATA::ID => MANUAL_SETPOINT_DATA::EXTRA_CRC,
34443            MEMORY_VECT_DATA::ID => MEMORY_VECT_DATA::EXTRA_CRC,
34444            MESSAGE_INTERVAL_DATA::ID => MESSAGE_INTERVAL_DATA::EXTRA_CRC,
34445            MISSION_ACK_DATA::ID => MISSION_ACK_DATA::EXTRA_CRC,
34446            MISSION_CLEAR_ALL_DATA::ID => MISSION_CLEAR_ALL_DATA::EXTRA_CRC,
34447            MISSION_COUNT_DATA::ID => MISSION_COUNT_DATA::EXTRA_CRC,
34448            MISSION_CURRENT_DATA::ID => MISSION_CURRENT_DATA::EXTRA_CRC,
34449            MISSION_ITEM_DATA::ID => MISSION_ITEM_DATA::EXTRA_CRC,
34450            MISSION_ITEM_INT_DATA::ID => MISSION_ITEM_INT_DATA::EXTRA_CRC,
34451            MISSION_ITEM_REACHED_DATA::ID => MISSION_ITEM_REACHED_DATA::EXTRA_CRC,
34452            MISSION_REQUEST_DATA::ID => MISSION_REQUEST_DATA::EXTRA_CRC,
34453            MISSION_REQUEST_INT_DATA::ID => MISSION_REQUEST_INT_DATA::EXTRA_CRC,
34454            MISSION_REQUEST_LIST_DATA::ID => MISSION_REQUEST_LIST_DATA::EXTRA_CRC,
34455            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => MISSION_REQUEST_PARTIAL_LIST_DATA::EXTRA_CRC,
34456            MISSION_SET_CURRENT_DATA::ID => MISSION_SET_CURRENT_DATA::EXTRA_CRC,
34457            MISSION_WRITE_PARTIAL_LIST_DATA::ID => MISSION_WRITE_PARTIAL_LIST_DATA::EXTRA_CRC,
34458            MOUNT_ORIENTATION_DATA::ID => MOUNT_ORIENTATION_DATA::EXTRA_CRC,
34459            NAMED_VALUE_FLOAT_DATA::ID => NAMED_VALUE_FLOAT_DATA::EXTRA_CRC,
34460            NAMED_VALUE_INT_DATA::ID => NAMED_VALUE_INT_DATA::EXTRA_CRC,
34461            NAV_CONTROLLER_OUTPUT_DATA::ID => NAV_CONTROLLER_OUTPUT_DATA::EXTRA_CRC,
34462            NAV_FILTER_BIAS_DATA::ID => NAV_FILTER_BIAS_DATA::EXTRA_CRC,
34463            OBSTACLE_DISTANCE_DATA::ID => OBSTACLE_DISTANCE_DATA::EXTRA_CRC,
34464            ODOMETRY_DATA::ID => ODOMETRY_DATA::EXTRA_CRC,
34465            ONBOARD_COMPUTER_STATUS_DATA::ID => ONBOARD_COMPUTER_STATUS_DATA::EXTRA_CRC,
34466            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => OPEN_DRONE_ID_ARM_STATUS_DATA::EXTRA_CRC,
34467            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => OPEN_DRONE_ID_AUTHENTICATION_DATA::EXTRA_CRC,
34468            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::EXTRA_CRC,
34469            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::EXTRA_CRC,
34470            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => OPEN_DRONE_ID_MESSAGE_PACK_DATA::EXTRA_CRC,
34471            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => OPEN_DRONE_ID_OPERATOR_ID_DATA::EXTRA_CRC,
34472            OPEN_DRONE_ID_SELF_ID_DATA::ID => OPEN_DRONE_ID_SELF_ID_DATA::EXTRA_CRC,
34473            OPEN_DRONE_ID_SYSTEM_DATA::ID => OPEN_DRONE_ID_SYSTEM_DATA::EXTRA_CRC,
34474            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::EXTRA_CRC,
34475            OPTICAL_FLOW_DATA::ID => OPTICAL_FLOW_DATA::EXTRA_CRC,
34476            OPTICAL_FLOW_RAD_DATA::ID => OPTICAL_FLOW_RAD_DATA::EXTRA_CRC,
34477            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::EXTRA_CRC,
34478            PARAM_EXT_ACK_DATA::ID => PARAM_EXT_ACK_DATA::EXTRA_CRC,
34479            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::EXTRA_CRC,
34480            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::EXTRA_CRC,
34481            PARAM_EXT_SET_DATA::ID => PARAM_EXT_SET_DATA::EXTRA_CRC,
34482            PARAM_EXT_VALUE_DATA::ID => PARAM_EXT_VALUE_DATA::EXTRA_CRC,
34483            PARAM_MAP_RC_DATA::ID => PARAM_MAP_RC_DATA::EXTRA_CRC,
34484            PARAM_REQUEST_LIST_DATA::ID => PARAM_REQUEST_LIST_DATA::EXTRA_CRC,
34485            PARAM_REQUEST_READ_DATA::ID => PARAM_REQUEST_READ_DATA::EXTRA_CRC,
34486            PARAM_SET_DATA::ID => PARAM_SET_DATA::EXTRA_CRC,
34487            PARAM_VALUE_DATA::ID => PARAM_VALUE_DATA::EXTRA_CRC,
34488            PING_DATA::ID => PING_DATA::EXTRA_CRC,
34489            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::EXTRA_CRC,
34490            PLAY_TUNE_V2_DATA::ID => PLAY_TUNE_V2_DATA::EXTRA_CRC,
34491            POSITION_TARGET_GLOBAL_INT_DATA::ID => POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC,
34492            POSITION_TARGET_LOCAL_NED_DATA::ID => POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
34493            POWER_STATUS_DATA::ID => POWER_STATUS_DATA::EXTRA_CRC,
34494            PROTOCOL_VERSION_DATA::ID => PROTOCOL_VERSION_DATA::EXTRA_CRC,
34495            RADIO_CALIBRATION_DATA::ID => RADIO_CALIBRATION_DATA::EXTRA_CRC,
34496            RADIO_STATUS_DATA::ID => RADIO_STATUS_DATA::EXTRA_CRC,
34497            RAW_IMU_DATA::ID => RAW_IMU_DATA::EXTRA_CRC,
34498            RAW_PRESSURE_DATA::ID => RAW_PRESSURE_DATA::EXTRA_CRC,
34499            RAW_RPM_DATA::ID => RAW_RPM_DATA::EXTRA_CRC,
34500            RC_CHANNELS_DATA::ID => RC_CHANNELS_DATA::EXTRA_CRC,
34501            RC_CHANNELS_OVERRIDE_DATA::ID => RC_CHANNELS_OVERRIDE_DATA::EXTRA_CRC,
34502            RC_CHANNELS_RAW_DATA::ID => RC_CHANNELS_RAW_DATA::EXTRA_CRC,
34503            RC_CHANNELS_SCALED_DATA::ID => RC_CHANNELS_SCALED_DATA::EXTRA_CRC,
34504            REQUEST_DATA_STREAM_DATA::ID => REQUEST_DATA_STREAM_DATA::EXTRA_CRC,
34505            REQUEST_EVENT_DATA::ID => REQUEST_EVENT_DATA::EXTRA_CRC,
34506            RESOURCE_REQUEST_DATA::ID => RESOURCE_REQUEST_DATA::EXTRA_CRC,
34507            RESPONSE_EVENT_ERROR_DATA::ID => RESPONSE_EVENT_ERROR_DATA::EXTRA_CRC,
34508            SAFETY_ALLOWED_AREA_DATA::ID => SAFETY_ALLOWED_AREA_DATA::EXTRA_CRC,
34509            SAFETY_SET_ALLOWED_AREA_DATA::ID => SAFETY_SET_ALLOWED_AREA_DATA::EXTRA_CRC,
34510            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::EXTRA_CRC,
34511            SCALED_IMU2_DATA::ID => SCALED_IMU2_DATA::EXTRA_CRC,
34512            SCALED_IMU3_DATA::ID => SCALED_IMU3_DATA::EXTRA_CRC,
34513            SCALED_PRESSURE_DATA::ID => SCALED_PRESSURE_DATA::EXTRA_CRC,
34514            SCALED_PRESSURE2_DATA::ID => SCALED_PRESSURE2_DATA::EXTRA_CRC,
34515            SCALED_PRESSURE3_DATA::ID => SCALED_PRESSURE3_DATA::EXTRA_CRC,
34516            SERIAL_CONTROL_DATA::ID => SERIAL_CONTROL_DATA::EXTRA_CRC,
34517            SERVO_OUTPUT_RAW_DATA::ID => SERVO_OUTPUT_RAW_DATA::EXTRA_CRC,
34518            SETUP_SIGNING_DATA::ID => SETUP_SIGNING_DATA::EXTRA_CRC,
34519            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => SET_ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
34520            SET_ATTITUDE_TARGET_DATA::ID => SET_ATTITUDE_TARGET_DATA::EXTRA_CRC,
34521            SET_GPS_GLOBAL_ORIGIN_DATA::ID => SET_GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
34522            SET_HOME_POSITION_DATA::ID => SET_HOME_POSITION_DATA::EXTRA_CRC,
34523            SET_MODE_DATA::ID => SET_MODE_DATA::EXTRA_CRC,
34524            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
34525                SET_POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC
34526            }
34527            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => SET_POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
34528            SIM_STATE_DATA::ID => SIM_STATE_DATA::EXTRA_CRC,
34529            SMART_BATTERY_INFO_DATA::ID => SMART_BATTERY_INFO_DATA::EXTRA_CRC,
34530            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::EXTRA_CRC,
34531            STORAGE_INFORMATION_DATA::ID => STORAGE_INFORMATION_DATA::EXTRA_CRC,
34532            SUPPORTED_TUNES_DATA::ID => SUPPORTED_TUNES_DATA::EXTRA_CRC,
34533            SYSTEM_TIME_DATA::ID => SYSTEM_TIME_DATA::EXTRA_CRC,
34534            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::EXTRA_CRC,
34535            TERRAIN_CHECK_DATA::ID => TERRAIN_CHECK_DATA::EXTRA_CRC,
34536            TERRAIN_DATA_DATA::ID => TERRAIN_DATA_DATA::EXTRA_CRC,
34537            TERRAIN_REPORT_DATA::ID => TERRAIN_REPORT_DATA::EXTRA_CRC,
34538            TERRAIN_REQUEST_DATA::ID => TERRAIN_REQUEST_DATA::EXTRA_CRC,
34539            TIMESYNC_DATA::ID => TIMESYNC_DATA::EXTRA_CRC,
34540            TIME_ESTIMATE_TO_TARGET_DATA::ID => TIME_ESTIMATE_TO_TARGET_DATA::EXTRA_CRC,
34541            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
34542                TRAJECTORY_REPRESENTATION_BEZIER_DATA::EXTRA_CRC
34543            }
34544            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
34545                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::EXTRA_CRC
34546            }
34547            TUNNEL_DATA::ID => TUNNEL_DATA::EXTRA_CRC,
34548            UALBERTA_SYS_STATUS_DATA::ID => UALBERTA_SYS_STATUS_DATA::EXTRA_CRC,
34549            UAVCAN_NODE_INFO_DATA::ID => UAVCAN_NODE_INFO_DATA::EXTRA_CRC,
34550            UAVCAN_NODE_STATUS_DATA::ID => UAVCAN_NODE_STATUS_DATA::EXTRA_CRC,
34551            UTM_GLOBAL_POSITION_DATA::ID => UTM_GLOBAL_POSITION_DATA::EXTRA_CRC,
34552            V2_EXTENSION_DATA::ID => V2_EXTENSION_DATA::EXTRA_CRC,
34553            VFR_HUD_DATA::ID => VFR_HUD_DATA::EXTRA_CRC,
34554            VIBRATION_DATA::ID => VIBRATION_DATA::EXTRA_CRC,
34555            VICON_POSITION_ESTIMATE_DATA::ID => VICON_POSITION_ESTIMATE_DATA::EXTRA_CRC,
34556            VIDEO_STREAM_INFORMATION_DATA::ID => VIDEO_STREAM_INFORMATION_DATA::EXTRA_CRC,
34557            VIDEO_STREAM_STATUS_DATA::ID => VIDEO_STREAM_STATUS_DATA::EXTRA_CRC,
34558            VISION_POSITION_ESTIMATE_DATA::ID => VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC,
34559            VISION_SPEED_ESTIMATE_DATA::ID => VISION_SPEED_ESTIMATE_DATA::EXTRA_CRC,
34560            WHEEL_DISTANCE_DATA::ID => WHEEL_DISTANCE_DATA::EXTRA_CRC,
34561            WIFI_CONFIG_AP_DATA::ID => WIFI_CONFIG_AP_DATA::EXTRA_CRC,
34562            WINCH_STATUS_DATA::ID => WINCH_STATUS_DATA::EXTRA_CRC,
34563            WIND_COV_DATA::ID => WIND_COV_DATA::EXTRA_CRC,
34564            _ => 0,
34565        }
34566    }
34567    fn target_system_id(&self) -> Option<u8> {
34568        match self {
34569            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_system),
34570            Self::CANFD_FRAME(inner) => Some(inner.target_system),
34571            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_system),
34572            Self::CAN_FRAME(inner) => Some(inner.target_system),
34573            Self::CHANGE_OPERATOR_CONTROL(inner) => Some(inner.target_system),
34574            Self::COMMAND_ACK(inner) => Some(inner.target_system),
34575            Self::COMMAND_CANCEL(inner) => Some(inner.target_system),
34576            Self::COMMAND_INT(inner) => Some(inner.target_system),
34577            Self::COMMAND_LONG(inner) => Some(inner.target_system),
34578            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_system),
34579            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_system),
34580            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_system),
34581            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_system),
34582            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_system),
34583            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_system),
34584            Self::GPS_INJECT_DATA(inner) => Some(inner.target_system),
34585            Self::LOGGING_ACK(inner) => Some(inner.target_system),
34586            Self::LOGGING_DATA(inner) => Some(inner.target_system),
34587            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_system),
34588            Self::LOG_ERASE(inner) => Some(inner.target_system),
34589            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_system),
34590            Self::LOG_REQUEST_END(inner) => Some(inner.target_system),
34591            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_system),
34592            Self::MISSION_ACK(inner) => Some(inner.target_system),
34593            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_system),
34594            Self::MISSION_COUNT(inner) => Some(inner.target_system),
34595            Self::MISSION_ITEM(inner) => Some(inner.target_system),
34596            Self::MISSION_ITEM_INT(inner) => Some(inner.target_system),
34597            Self::MISSION_REQUEST(inner) => Some(inner.target_system),
34598            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_system),
34599            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_system),
34600            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_system),
34601            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_system),
34602            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_system),
34603            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_system),
34604            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_system),
34605            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_system),
34606            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_system),
34607            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_system),
34608            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_system),
34609            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_system),
34610            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_system),
34611            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_system),
34612            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_system),
34613            Self::PARAM_EXT_SET(inner) => Some(inner.target_system),
34614            Self::PARAM_MAP_RC(inner) => Some(inner.target_system),
34615            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_system),
34616            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_system),
34617            Self::PARAM_SET(inner) => Some(inner.target_system),
34618            Self::PING(inner) => Some(inner.target_system),
34619            Self::PLAY_TUNE(inner) => Some(inner.target_system),
34620            Self::PLAY_TUNE_V2(inner) => Some(inner.target_system),
34621            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_system),
34622            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_system),
34623            Self::REQUEST_EVENT(inner) => Some(inner.target_system),
34624            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_system),
34625            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_system),
34626            Self::SERIAL_CONTROL(inner) => Some(inner.target_system),
34627            Self::SETUP_SIGNING(inner) => Some(inner.target_system),
34628            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_system),
34629            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_system),
34630            Self::SET_GPS_GLOBAL_ORIGIN(inner) => Some(inner.target_system),
34631            Self::SET_HOME_POSITION(inner) => Some(inner.target_system),
34632            Self::SET_MODE(inner) => Some(inner.target_system),
34633            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_system),
34634            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_system),
34635            Self::SUPPORTED_TUNES(inner) => Some(inner.target_system),
34636            Self::TIMESYNC(inner) => Some(inner.target_system),
34637            Self::TUNNEL(inner) => Some(inner.target_system),
34638            Self::V2_EXTENSION(inner) => Some(inner.target_system),
34639            _ => None,
34640        }
34641    }
34642    fn target_component_id(&self) -> Option<u8> {
34643        match self {
34644            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_component),
34645            Self::CANFD_FRAME(inner) => Some(inner.target_component),
34646            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_component),
34647            Self::CAN_FRAME(inner) => Some(inner.target_component),
34648            Self::COMMAND_ACK(inner) => Some(inner.target_component),
34649            Self::COMMAND_CANCEL(inner) => Some(inner.target_component),
34650            Self::COMMAND_INT(inner) => Some(inner.target_component),
34651            Self::COMMAND_LONG(inner) => Some(inner.target_component),
34652            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_component),
34653            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_component),
34654            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_component),
34655            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_component),
34656            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_component),
34657            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_component),
34658            Self::GPS_INJECT_DATA(inner) => Some(inner.target_component),
34659            Self::LOGGING_ACK(inner) => Some(inner.target_component),
34660            Self::LOGGING_DATA(inner) => Some(inner.target_component),
34661            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_component),
34662            Self::LOG_ERASE(inner) => Some(inner.target_component),
34663            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_component),
34664            Self::LOG_REQUEST_END(inner) => Some(inner.target_component),
34665            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_component),
34666            Self::MISSION_ACK(inner) => Some(inner.target_component),
34667            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_component),
34668            Self::MISSION_COUNT(inner) => Some(inner.target_component),
34669            Self::MISSION_ITEM(inner) => Some(inner.target_component),
34670            Self::MISSION_ITEM_INT(inner) => Some(inner.target_component),
34671            Self::MISSION_REQUEST(inner) => Some(inner.target_component),
34672            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_component),
34673            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_component),
34674            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_component),
34675            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_component),
34676            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_component),
34677            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_component),
34678            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_component),
34679            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_component),
34680            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_component),
34681            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_component),
34682            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_component),
34683            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_component),
34684            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_component),
34685            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_component),
34686            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_component),
34687            Self::PARAM_EXT_SET(inner) => Some(inner.target_component),
34688            Self::PARAM_MAP_RC(inner) => Some(inner.target_component),
34689            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_component),
34690            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_component),
34691            Self::PARAM_SET(inner) => Some(inner.target_component),
34692            Self::PING(inner) => Some(inner.target_component),
34693            Self::PLAY_TUNE(inner) => Some(inner.target_component),
34694            Self::PLAY_TUNE_V2(inner) => Some(inner.target_component),
34695            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_component),
34696            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_component),
34697            Self::REQUEST_EVENT(inner) => Some(inner.target_component),
34698            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_component),
34699            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_component),
34700            Self::SERIAL_CONTROL(inner) => Some(inner.target_component),
34701            Self::SETUP_SIGNING(inner) => Some(inner.target_component),
34702            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_component),
34703            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_component),
34704            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_component),
34705            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_component),
34706            Self::SUPPORTED_TUNES(inner) => Some(inner.target_component),
34707            Self::TIMESYNC(inner) => Some(inner.target_component),
34708            Self::TUNNEL(inner) => Some(inner.target_component),
34709            Self::V2_EXTENSION(inner) => Some(inner.target_component),
34710            _ => None,
34711        }
34712    }
34713}